/**
 * SERP Preview Tool - Rich Snippets Styles
 * Styling for FAQ, ratings, breadcrumbs, and sitelinks
 */

/* ===========================================
   STAR RATINGS
   =========================================== */
.serp-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    line-height: 20px;
    color: #70757a;
    margin-top: 4px;
    margin-bottom: 4px;
}

.serp-rating .stars {
    color: #fbbc04;
    font-size: 14px;
    letter-spacing: -1px;
}

.serp-rating .rating-value {
    color: #70757a;
    font-size: 14px;
}

.serp-rating .rating-separator {
    color: #70757a;
}

.serp-rating .review-count {
    color: #70757a;
    font-size: 14px;
}

/* ===========================================
   BREADCRUMBS
   =========================================== */
.serp-breadcrumbs {
    font-size: 12px;
    line-height: 18px;
    color: #4d5156;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
}

.serp-breadcrumb-item {
    display: inline-flex;
    align-items: center;
}

.serp-breadcrumb-item:not(:last-child)::after {
    content: ' ›';
    margin: 0 4px;
    color: #70757a;
}

.serp-breadcrumb-link {
    color: #4d5156;
    text-decoration: none;
}

.serp-breadcrumb-link:hover {
    text-decoration: underline;
}

/* ===========================================
   FAQ SCHEMA
   =========================================== */
.serp-faq {
    margin-top: 8px;
    border-top: 1px solid #dadce0;
    font-family: Arial, sans-serif;
}

.serp-faq-item {
    border-bottom: 1px solid #dadce0;
}

.serp-faq-item:last-child {
    border-bottom: none;
}

.serp-faq-question {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    cursor: pointer;
    color: #1a0dab;
    font-size: 14px;
    line-height: 1.4;
    user-select: none;
}

.serp-faq-question:hover {
    text-decoration: underline;
}

.serp-faq-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: #70757a;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.serp-faq-arrow svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
}

.serp-faq-item.expanded .serp-faq-arrow {
    transform: rotate(180deg);
}

.serp-faq-answer {
    display: none;
    padding: 0 0 12px 32px;
    font-size: 14px;
    line-height: 1.58;
    color: #4d5156;
}

.serp-faq-item.expanded .serp-faq-answer {
    display: block;
}

/* FAQ limit indicator */
.serp-faq-more {
    padding: 12px 0;
    font-size: 14px;
    color: #70757a;
}

/* ===========================================
   SITELINKS
   =========================================== */
.serp-sitelinks {
    margin-top: 8px;
    padding-top: 8px;
}

.serp-sitelinks-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px 24px;
}

.serp-sitelink {
    display: block;
    padding: 4px 0;
}

.serp-sitelink-title {
    font-size: 14px;
    line-height: 1.3;
    color: #1a0dab;
    cursor: pointer;
    display: block;
}

.serp-sitelink-title:hover {
    text-decoration: underline;
}

.serp-sitelink-description {
    font-size: 12px;
    line-height: 1.4;
    color: #4d5156;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Compact sitelinks (inline) */
.serp-sitelinks.compact {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}

.serp-sitelinks.compact .serp-sitelink {
    padding: 0;
}

.serp-sitelinks.compact .serp-sitelink::after {
    content: ' · ';
    color: #70757a;
    padding: 0 8px;
}

.serp-sitelinks.compact .serp-sitelink:last-child::after {
    content: none;
}

.serp-sitelinks.compact .serp-sitelink-description {
    display: none;
}

/* ===========================================
   ADDITIONAL RICH SNIPPET TYPES (Future)
   =========================================== */

/* Product Price */
.serp-price {
    font-size: 14px;
    color: #202124;
    margin-top: 4px;
}

.serp-price-value {
    font-weight: 500;
}

.serp-price-stock {
    color: #188038;
    margin-left: 8px;
}

.serp-price-stock.out-of-stock {
    color: #d93025;
}

/* Event Date */
.serp-event-date {
    font-size: 14px;
    color: #70757a;
    margin-top: 4px;
}

/* Recipe */
.serp-recipe-info {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    color: #70757a;
    margin-top: 4px;
}

.serp-recipe-time,
.serp-recipe-calories {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Video */
.serp-video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 2px;
}

/* ===========================================
   ANIMATIONS
   =========================================== */
.serp-faq-item .serp-faq-answer {
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===========================================
   EXPORT ADJUSTMENTS
   =========================================== */
.export-mode .serp-faq-item.expanded .serp-faq-answer {
    display: block !important;
}

.export-mode .serp-faq-arrow {
    transition: none;
}
