/**
 * Ametica Reviews Plugin - Global CSS
 * Version: 4.1.0
 * Description: Global styles for all Ametica Reviews components
 */

/* ==========================================================================
   Legacy Styles (preserved from v3.x)
   ========================================================================== */

.wa-archive-main-area__sidebar .heureka-reviews-badge {
    margin-top: var(--space-s);
}

.heurekaShopReviews.heurekaShopReviewsLongBottom ul > li {
    flex: 0 0 33%;
    max-height: 500px;
    opacity: 1;
    transition: ease-in-out 0.1s;
    overflow: hidden;
}

.heurekaShopReviews ul > li.hidden,
.heurekaProductReviews ul > li.hidden {
    opacity: 0;
    max-height: 0px;
    overflow: hidden;
    margin: 0;
    padding: 0;
    transition: all 0.3s ease;
}

/* Shop Reviews List Actions */
.heurekaShopReviews__actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
}

.heurekaShopReviews__actions .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-block: var(--amtc-btn-padding-block, 12px);
    padding-inline: var(--amtc-btn-padding-inline, 24px);
    font-size: var(--amtc-btn-font-size, 14px);
    font-weight: var(--amtc-btn-font-weight, 500);
    border-radius: var(--amtc-btn-radius, 6px);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.heurekaShopReviews__actions .loadMoreReviews {
    background: var(--amtc-primary, #69a81d);
    color: #fff;
    border: none;
}

.heurekaShopReviews__actions .loadMoreReviews:hover {
    background: var(--amtc-secondary, #5a9118);
}

.heurekaShopReviews__actions .goToAllReviews {
    background: #f0f0f0;
    color: #333;
    border: 1px solid var(--amtc-border-color, #ddd);
}

.heurekaShopReviews__actions .goToAllReviews:hover {
    background: #e5e5e5;
}

.heurekaShopReviewsShort ul > li:nth-child(odd) .vc-rating-item, 
.heurekaShopReviewsLongTop ul > li:nth-child(odd) .vc-rating-item {
    padding-left: 0px;
}

.heurekaShopReviewsShort ul > li:nth-child(even) .vc-rating-item, 
.heurekaShopReviewsLongTop ul > li:nth-child(even) .vc-rating-item {
    padding-right: 0px;
}

.heurekaShopReviews.heurekaShopReviewsLongBottom ul > li:nth-child(3n+1) .vc-rating-item {
    padding-left: 0px;
}

.heurekaShopReviews.heurekaShopReviewsLongBottom ul > li:nth-child(3n+3) .vc-rating-item {
    padding-right: 0px;
}

.heurekaShopReviews button.loadMoreReviews, 
.heurekaShopReviews button.goToAllReviews {
    font-size: var(--amtc-btn-font-size, 1em);
    background-color: var(--amtc-primary, #21a73f);
    padding-block: var(--amtc-btn-padding-block, 0.5em);
    padding-inline: var(--amtc-btn-padding-inline, 1.3em);
    float: right;
    color: white;
    font-weight: var(--amtc-btn-font-weight, 500);
    transition: ease-in-out 0.1s;
    border: 0;
    border-radius: var(--amtc-btn-radius, .2em);
    align-self: flex-end;
    cursor: pointer !important;
}

.sr-only {
    border: 0;
    clip: rect(0,0,0,0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}

.vc-rating-stars-rating {
    background-position: 0 0;
    position: absolute;
    top: 0;
}

.heurekaShopReviews button.loadMoreReviews:hover, 
.heurekaShopReviews button.goToAllReviews:hover {
    background-color: #179433 !important;
    color: #fff !important;
}

@media only screen and (max-width: 489px) {
    .heurekaShopReviews ul > li .vc-rating-item {
        padding: 0; 
    }
}

.heurekaShopReviewsLongBottom {
    overflow: hidden;
    transition: ease-in-out 0.2s;
    display: flex;
    flex-direction: column;
}

.heurekaShopReviews .loadingIndicator {
    display: none;
    align-self: center;
}

.heurekaShopReviews.loading .loadingIndicator {
    display: block;
}

.heurekaShopReviewsLongBottom.hidden {
    max-height: 0px;
    opacity: 0px;
}

.heurekaShopReviewsLongBottom h1 {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-top: 0px;
    margin-bottom: 30px;
    text-align: center;
}

@media (max-width: 767px) {
    body .heureka-reviews-wrapper {
        z-index: 100;
    }

    body .heureka-reviews-wrapper .primary-button {
        margin-top: var(--space-l);
    }
}


/* ==========================================================================
   Unified Review Card (v4.1.0)
   Used by Grid, Carousel, and other layouts
   ========================================================================== */

.amtc-review-card {
    background: #fff;
    border: 1px solid var(--amtc-border-color, #e5e5e5);
    border-radius: var(--amtc-card-radius, 12px);
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
    box-sizing: border-box;
}

/* Schema.org Review wrapper inside product cards - transparent for layout,
   its children act as direct flex items of the card */
.amtc-review-card__schema-review {
    display: contents;
}

/* Card Header */
.amtc-review-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}

.amtc-review-card__rating {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ==========================================================================
   Star Rating Component
   ========================================================================== */

.amtc-star-rating {
    position: relative;
    display: inline-block;
    font-size: 1.15em;
    line-height: 1;
    letter-spacing: 2px;
}

.amtc-star-rating__empty {
    color: #e0e0e0;
}

.amtc-star-rating__filled {
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    white-space: nowrap;
    color: #ffc107;
}

/* Size modifiers */
.amtc-star-rating--small {
    font-size: 0.85em;
    letter-spacing: 1px;
}

.amtc-star-rating--large {
    font-size: 1.5em;
    letter-spacing: 3px;
}

.amtc-star-rating--badge {
    font-size: 1.3em;
    letter-spacing: 2px;
}

/* Legacy star styles (kept for backwards compatibility) */
.amtc-review-card__stars {
    color: #ffc107;
    font-size: 1.15em;
    letter-spacing: 1px;
    line-height: 1;
}

.amtc-review-card__rating-number {
    font-weight: 700;
    font-size: 0.9em;
    color: var(--amtc-card-text, #1a1a1a);
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 2px 6px;
    border-radius: var(--amtc-card-inner-radius, 6px);
}

.amtc-review-card__date {
    color: var(--amtc-card-text-secondary, #6c757d);
    font-size: 0.85em;
}

/* Card Author */
.amtc-review-card__author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--amtc-divider-color, #f0f0f0);
}

.amtc-review-card__avatar {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--amtc-primary, #69a81d), var(--amtc-primary-light, #8bc34a));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    text-transform: uppercase;
    /*box-shadow: 0 2px 8px rgba(var(--amtc-primary-rgb, 105, 168, 29), 0.3);*/
}

.amtc-review-card__name {
    font-weight: 600;
    font-size: 1em;
    color: var(--amtc-card-text, #1a1a1a);
}

/* Review Type Badge */
.amtc-review-card__type {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    margin-top: 12px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--amtc-primary-ultra-light, #e8f5e9), #f8f9fa);
    border: 1px solid var(--amtc-primary-soft, #c8e6c9);
    border-radius: var(--amtc-card-inner-radius, 6px);
    font-size: 0.85em;
    color: var(--amtc-primary-dark, #2e7d32);
}

.amtc-review-card__type-label {
    font-weight: 500;
    color: var(--amtc-primary-dark, #2e7d32);
}

.amtc-review-card__type-link {
    font-weight: 500;
    color: var(--amtc-primary, #69a81d);
    text-decoration: none;
    transition: color 0.2s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.amtc-review-card__type-link:hover {
    color: var(--amtc-secondary, #5a9118);
    text-decoration: underline;
}

/* Compact mode: hide type badge */
.amtc-review-card--compact .amtc-review-card__type {
    display: none;
}

/* Card Body (Content + Type wrapper) */
.amtc-review-card__body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Card Content */
.amtc-review-card__content {
    flex-grow: 1;
    margin-bottom: 12px;
    max-height: 8.5em !important; /* Approximately 5 lines of text */
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px; /* Space for scrollbar */
}

/* Custom scrollbar styling for review content */
.amtc-review-card__content::-webkit-scrollbar {
    width: 6px;
}

.amtc-review-card__content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.amtc-review-card__content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.amtc-review-card__content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.amtc-review-card__summary {
    color: var(--amtc-card-text, #495057);
    line-height: 1.6;
    margin: 0 0 12px 0;
    font-size: 0.95em;
}

/* Quote style - enabled via Customization "Review Text Style" option */
.amtc-review-card__summary--quoted {
    font-style: italic;
}

.amtc-review-card__pros,
.amtc-review-card__cons {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 8px 0;
    font-size: 0.9em;
    line-height: 1.5;
}

.amtc-review-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    min-width: 20px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 14px;
}

.amtc-review-card__pros {
    color: var(--amtc-primary-dark, #2e7d32);
}

.amtc-review-card__pros .amtc-review-card__icon {
    background: var(--amtc-primary-ultra-light, #e8f5e9);
    color: var(--amtc-primary-dark, #2e7d32);
}

.amtc-review-card__cons {
    color: #c62828;
}

.amtc-review-card__cons .amtc-review-card__icon {
    background: #ffebee;
    color: #c62828;
}

/* Card Reaction */
.amtc-review-card__reaction {
    background: linear-gradient(135deg, #f8f9fa, #fff);
    border: 1px solid var(--amtc-divider-color, #e9ecef);
    padding: 14px;
    border-radius: var(--amtc-card-inner-radius, 8px);
    margin-top: 12px;
    font-size: 0.9em;
}

.amtc-review-card__reaction strong {
    display: block;
    color: var(--amtc-card-text, #495057);
    font-size: 0.85em;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.amtc-review-card__reaction p {
    margin: 0;
    color: var(--amtc-card-text, #495057);
    line-height: 1.5;
}

/* Card Footer */
.amtc-review-card__footer {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--amtc-divider-color, #f0f0f0);
}

.amtc-review-card__recommend {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--amtc-primary-dark, #2e7d32);
    font-weight: 600;
    font-size: 0.9em;
    background: var(--amtc-primary-ultra-light, #e8f5e9);
    padding: 6px 12px;
    border-radius: 20px;
}


/* ==========================================================================
   Reviews Grid
   ========================================================================== */

.amtc-reviews-grid {
    display: grid;
    gap: 24px;
    margin: 0;
}

.amtc-grid-col-1 { grid-template-columns: minmax(0, 1fr); }
.amtc-grid-col-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.amtc-grid-col-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.amtc-grid-col-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 992px) {
    .amtc-grid-col-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
    .amtc-grid-col-3,
    .amtc-grid-col-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    
    .amtc-reviews-grid {
        gap: 16px;
    }
    
    .amtc-grid-controls .amtc-btn {
        width: auto;
    }
}

@media (max-width: 576px) {
    .amtc-grid-col-2,
    .amtc-grid-col-3,
    .amtc-grid-col-4 { grid-template-columns: minmax(0, 1fr); }
}

.amtc-grid-item {
    display: flex;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.amtc-grid-item .amtc-review-card {
    width: 100%;
}

/* Grid Load More */
.amtc-grid-item.amtc-hidden {
    display: none;
}

.amtc-grid-item.amtc-fade-in {
    animation: amtc-fadeInUp 0.4s ease forwards;
}

@keyframes amtc-fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.amtc-grid-controls {
    display: flex;
    justify-content: center;
    margin-top: 24px;
    margin-bottom: 16px;
}

.amtc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-block: var(--amtc-btn-padding-block, 12px);
    padding-inline: var(--amtc-btn-padding-inline, 28px);
    font-size: var(--amtc-btn-font-size, 15px);
    font-weight: var(--amtc-btn-font-weight, 600);
    border-radius: var(--amtc-btn-radius, 8px);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    border: none;
    font-family: inherit;
}

.amtc-btn-loadmore {
    background: linear-gradient(135deg, var(--amtc-primary, #69a81d), var(--amtc-secondary, #5a9118));
    color: #fff;
    /*box-shadow: 0 4px 12px rgba(var(--amtc-primary-rgb, 105, 168, 29), 0.3);*/
}

.amtc-btn-loadmore:hover {
    background: linear-gradient(135deg, var(--amtc-secondary, #5a9118), var(--amtc-secondary-dark, #4a7a14));
    transform: translateY(0);
    /*box-shadow: 0 6px 16px rgba(var(--amtc-primary-rgb, 105, 168, 29), 0.4);*/
}

.amtc-btn-loadmore:active {
    transform: translateY(0);
}

.amtc-btn-secondary {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid var(--amtc-border-color, #dee2e6);
}

.amtc-btn-secondary:hover {
    background: #e9ecef;
    color: #212529;
    transform: translateY(0);
}


/* ==========================================================================
   Reviews List (Full-width cards)
   ========================================================================== */

.amtc-reviews-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 0;
}

.amtc-list-item {
    width: 100%;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.amtc-list-item .amtc-review-card {
    width: 100%;
}

/* Full-width card adjustments for list view */
.amtc-reviews-list .amtc-review-card {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    padding: 24px 28px;
}

.amtc-reviews-list .amtc-review-card__header {
    width: 100%;
    margin-bottom: 16px;
    order: 0;
}

.amtc-reviews-list .amtc-review-card__author {
    flex: 0;
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
    margin-right: 24px;
    min-width: 180px;
    order: 1;
}

.amtc-reviews-list .amtc-review-card__body {
    flex: 1;
    min-width: 300px;
    order: 2;
}

.amtc-reviews-list .amtc-review-card__content {
    margin-bottom: 0;
    max-height: 6em !important; /* Approximately 3 lines of text for list view */
}

.amtc-reviews-list .amtc-review-card__type {
    width: fit-content;
    margin-top: 12px;
    margin-bottom: 0;
}

.amtc-reviews-list .amtc-review-card__footer {
    width: 100%;
    margin-top: 12px;
    order: 4;
}

.amtc-reviews-list .amtc-review-card__reaction {
    width: 100%;
    margin-top: 16px;
    order: 5;
}

/* List item states */
.amtc-list-item.amtc-hidden {
    display: none;
}

.amtc-list-item.amtc-fade-in {
    animation: amtc-fadeInUp 0.4s ease forwards;
}

/* List controls */
.amtc-list-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
}

/* Compact card modifier */
.amtc-review-card--compact {
    padding: 16px;
}

/* Compact layout swaps rows: author name on top, stars + date below it
   (the card is a flex column, so plain order works). The divider moves
   from the author row to the header so it still sits above the content */
.amtc-review-card--compact .amtc-review-card__header {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--amtc-divider-color, #f0f0f0);
}

.amtc-review-card--compact .amtc-review-card__avatar {
    display: none;
}

.amtc-review-card--compact .amtc-review-card__author {
    order: -1;
    margin-bottom: 8px;
    padding-bottom: 0;
    border-bottom: none;
}

/* Date renders inside the author row in compact mode - push it to the right */
.amtc-review-card--compact .amtc-review-card__author .amtc-review-card__date {
    margin-left: auto;
}

.amtc-review-card--compact .amtc-review-card__content {
    margin-bottom: 0;
}

.amtc-review-card--compact .amtc-review-card__summary {
    margin-bottom: 0;
}

/* Responsive adjustments for list */
@media (max-width: 768px) {
    .amtc-reviews-list .amtc-review-card {
        flex-direction: column;
        padding: 20px;
    }
    
    .amtc-reviews-list .amtc-review-card__author {
        width: 100%;
        margin-right: 0;
        margin-bottom: 16px;
        padding-bottom: 16px;
        border-bottom: 1px solid var(--amtc-divider-color, #f0f0f0);
    }
    
    .amtc-reviews-list .amtc-review-card__body {
        min-width: 100%;
    }
    
    .amtc-reviews-list .amtc-review-card__content {
        min-width: 100%;
    }
    
    .amtc-list-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .amtc-list-controls .amtc-btn {
        width: auto;
    }
}


/* ==========================================================================
   Reviews Carousel
   ========================================================================== */

.amtc-reviews-carousel {
    position: relative;
}

.amtc-carousel-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.amtc-carousel-item {
    display: flex;
}

/* Splide integration
   Track padding and pagination styles live in shopReviewsCarousel.css
   (single source - do not duplicate here, the selectors fight each other) */
.amtc-reviews-carousel .splide__slide {
    padding: 0 1px;
}

.amtc-reviews-carousel .splide__slide .amtc-review-card {
    height: 100%;
    min-height: 280px;
}

/* Carousel card adjustments */
.amtc-review-card--carousel {
    min-height: 280px;
}

.amtc-review-card--carousel .amtc-review-card__content {
    max-height: 8.5em !important; /* Approximately 5 lines of text */
    overflow-y: auto;
    overflow-x: hidden;
}

.amtc-review-card--carousel .amtc-review-card__reaction {
    display: none;
}

/* Compact mode for carousel */
.amtc-review-card--carousel.amtc-review-card--compact {
    min-height: auto;
}

.amtc-review-card--carousel.amtc-review-card--compact .amtc-review-card__content {
    max-height: none !important;
}

.amtc-review-card--carousel.amtc-review-card--compact .amtc-review-card__content::after {
    display: none;
}

.amtc-reviews-carousel .splide__slide .amtc-review-card--compact {
    min-height: auto;
    height: auto;
}

/* ==========================================================================
   Reviews Stats
   ========================================================================== */

.amtc-reviews-stats {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 32px;
    padding: 24px 32px;
    background: var(--amtc-stats-bg, linear-gradient(135deg, #f8f9fa, #fff));
    border: 1px solid var(--amtc-border-color, #e5e5e5);
    border-radius: var(--amtc-card-radius, 16px);
    /*box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);*/
    width: fit-content;
    max-width: 100%;
}

/* When breakdown is present, use full width */
.amtc-reviews-stats:has(.amtc-stats-breakdown) {
    width: 100%;
}

.amtc-stats-basic {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex-shrink: 0;
}

.amtc-stats-rating {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    margin-bottom: 8px;
}

.amtc-stats-stars {
    color: #ffc107;
    font-size: 1.5em;
    letter-spacing: 2px;
}

.amtc-stats-number {
    font-size: 1.3em;
    color: #333;
}

.amtc-stats-number strong {
    font-size: 1.4em;
    color: var(--amtc-primary, #69a81d);
}

.amtc-stats-count {
    color: #666;
    font-size: 0.95em;
}

.amtc-stats-count strong {
    color: #333;
}

.amtc-stats-recommend {
    margin-top: 8px;
    color: var(--amtc-primary-dark, #2e7d32);
    font-size: 0.9em;
    font-weight: 500;
}

.amtc-stats-no-reviews {
    text-align: center;
    color: #666;
    font-size: 1em;
    padding: 20px;
}

/* Rating Breakdown */
.amtc-stats-breakdown {
    flex: 1;
    padding-left: 32px;
    border-left: 1px solid var(--amtc-border-color, #e5e5e5);
    width: 100%;
    min-width: 0;
}

/* Vertical layout - [heurekaStats layout="vertical"]:
   breakdown stacks under basic stats, everything left-aligned.
   Basic stats form a grid: big number on the left spanning two rows,
   stars top right, review count under the stars */
.amtc-reviews-stats--vertical {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
}

.amtc-reviews-stats--vertical .amtc-stats-basic {
    display: grid;
    grid-template-columns: auto auto;
    justify-content: start;
    align-items: center;
    column-gap: 14px;
    row-gap: 2px;
    text-align: left;
}

/* Promote number + stars into the basic stats grid */
.amtc-reviews-stats--vertical .amtc-stats-rating {
    display: contents;
}

.amtc-reviews-stats--vertical .amtc-stats-number {
    grid-column: 1;
    grid-row: 1 / 3;
    font-size: 1.6em;
}

.amtc-reviews-stats--vertical .amtc-stats-basic .amtc-star-rating {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
}

.amtc-reviews-stats--vertical .amtc-stats-count {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
}

.amtc-reviews-stats--vertical .amtc-stats-recommend {
    grid-column: 1 / -1;
}

.amtc-reviews-stats--vertical .amtc-stats-breakdown {
    flex: none;
    padding-left: 0;
    border-left: none;
    max-width: 420px;
}

/* "Write a review" button below stats */
.amtc-stats-review-button {
    width: 100%;
}

/* Vertical layout: button stretches to full stats width */
.amtc-reviews-stats--vertical .amtc-stats-review-button .amtc-write-review-button {
    width: 100%;
}

.amtc-breakdown-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}

.amtc-breakdown-row:last-child {
    margin-bottom: 0;
}

.amtc-breakdown-stars {
    display: flex;
    gap: 2px;
    min-width: 100px;
    font-size: 1.1em;
    line-height: 1;
}

.amtc-breakdown-star {
    display: inline-block;
}

.amtc-breakdown-star--filled {
    color: #ffc107;
}

.amtc-breakdown-star--empty {
    color: var(--amtc-breakdown-bar-bg, #e0e0e0);
}

.amtc-breakdown-bar-container {
    flex: 1;
    height: 10px;
    background-color: var(--amtc-breakdown-bar-bg, #f0f0f0);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.amtc-breakdown-bar {
    height: 100%;
    background-color: var(--amtc-breakdown-bar, #666);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.amtc-breakdown-count {
    min-width: 40px;
    text-align: right;
    font-size: 0.95em;
    color: #333;
    font-weight: 500;
}

@media (max-width: 768px) {
    .amtc-reviews-stats {
        flex-direction: column;
        align-items: center;
        gap: 0;
    }
    
    .amtc-stats-basic {
        width: 100%;
    }
    
    .amtc-stats-breakdown {
        margin-top: 24px;
        padding-top: 24px;
        padding-left: 0;
        border-left: none;
        border-top: 1px solid var(--amtc-border-color, #e5e5e5);
        max-width: 500px;
    }

    .amtc-reviews-stats .amtc-stats-review-button {
        margin-top: 20px;
    }
}

@media (max-width: 576px) {
    .amtc-breakdown-stars {
        min-width: 80px;
        font-size: 1em;
    }
    
    .amtc-breakdown-count {
        min-width: 35px;
        font-size: 0.9em;
    }
}


/* ==========================================================================
   Heureka Badge
   ========================================================================== */

.amtc-heureka-badge {
    background: #fff;
    border: 2px solid var(--amtc-primary, #69a81d);
    border-radius: var(--amtc-card-radius, 16px);
    padding: 24px;
    text-align: center;
    max-width: 300px;
    /*box-shadow: 0 4px 12px rgba(var(--amtc-primary-rgb, 105, 168, 29), 0.15);*/
}

.amtc-badge-small {
    padding: 16px 20px;
    max-width: 200px;
}

.amtc-badge-large {
    max-width: 380px;
}

.amtc-badge-header {
    margin-bottom: 16px;
}

.amtc-heureka-logo {
    width: 110px;
    height: auto;
    margin-bottom: 8px;
}

.amtc-badge-small .amtc-heureka-logo {
    width: 90px;
}

.amtc-badge-verified {
    color: var(--amtc-primary, #69a81d);
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.amtc-badge-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 10px;
}

.amtc-badge-stars {
    color: #ffc107;
    font-size: 1.3em;
    letter-spacing: 1px;
}

.amtc-badge-small .amtc-badge-stars {
    font-size: 1.1em;
}

.amtc-badge-score {
    font-size: 1.1em;
}

.amtc-badge-score strong {
    font-size: 1.5em;
    color: var(--amtc-primary, #69a81d);
}

.amtc-badge-count {
    color: #666;
    font-size: 0.9em;
}

.amtc-badge-reviews {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--amtc-divider-color, #e9ecef);
    text-align: left;
}

.amtc-badge-reviews-title {
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 12px;
    font-size: 0.9em;
}

.amtc-badge-review-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--amtc-divider-color, #f0f0f0);
}

.amtc-badge-review-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.amtc-badge-review-rating {
    color: #ffc107;
    font-size: 0.9em;
    margin-bottom: 6px;
}

.amtc-badge-review-text {
    color: #495057;
    font-size: 0.85em;
    line-height: 1.5;
    font-style: italic;
}

.amtc-badge-review-author {
    color: #6c757d;
    font-size: 0.8em;
    margin-top: 6px;
}

.amtc-badge-footer {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--amtc-divider-color, #e9ecef);
}

.amtc-badge-link {
    color: var(--amtc-primary, #69a81d);
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 600;
    transition: color 0.2s ease;
}

.amtc-badge-link:hover {
    color: var(--amtc-secondary, #5a9118);
    text-decoration: underline;
}

/* Demo Badge Styles */
.amtc-heureka-badge--demo {
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
}

.amtc-badge-demo-link {
    display: block;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.amtc-badge-demo-link:hover {
    transform: scale(1.02);
}

.amtc-badge-demo-image {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    width: 100%;
}

.amtc-badge-demo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px dashed #adb5bd;
    border-radius: 12px;
    text-align: center;
    min-height: 150px;
}

.amtc-badge-demo-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.amtc-badge-demo-text {
    color: #495057;
}

.amtc-badge-demo-text strong {
    display: block;
    font-size: 1.1em;
    margin-bottom: 4px;
}

.amtc-badge-demo-text span {
    display: block;
    color: #6c757d;
    font-size: 0.9em;
    margin-bottom: 8px;
}

.amtc-badge-demo-text small {
    display: block;
    font-size: 0.75em;
    color: #868e96;
    line-height: 1.4;
}

.amtc-badge-demo-text code {
    display: inline-block;
    background: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    margin-top: 4px;
}

/* Official Widget Container */
.amtc-heureka-badge--official {
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    min-height: 80px;
}

/* Custom Badge Adjustments */

/* Badge "View all reviews" button */
.amtc-badge-view-all {
    margin-top: 16px;
    text-align: center;
}

.amtc-badge-view-all-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-block: var(--amtc-btn-padding-block, 10px);
    padding-inline: var(--amtc-btn-padding-inline, 24px);
    font-size: var(--amtc-btn-font-size, 14px);
    font-weight: var(--amtc-btn-font-weight, 600);
    border-radius: var(--amtc-btn-radius, 6px);
    background: linear-gradient(135deg, var(--amtc-primary, #69a81d), var(--amtc-secondary, #5a9118));
    color: #fff;
    text-decoration: none;
    transition: all 0.2s ease;
    /*box-shadow: 0 2px 8px rgba(var(--amtc-primary-rgb, 105, 168, 29), 0.25);*/
    line-height: 1.5;
}

.amtc-badge-view-all-button:hover {
    background: linear-gradient(135deg, var(--amtc-secondary, #5a9118), var(--amtc-secondary-dark, #4a7a14));
    transform: translateY(0);
    /*box-shadow: 0 4px 12px rgba(var(--amtc-primary-rgb, 105, 168, 29), 0.35);*/
    color: #fff;
    text-decoration: none;
}

.amtc-badge-view-all-button:active {
    transform: translateY(0);
}


/* ==========================================================================
   Common Utilities
   ========================================================================== */

.amtc-loading {
    display: flex;
    justify-content: center;
    padding: 40px;
}

.amtc-loading::after {
    content: '';
    width: 32px;
    height: 32px;
    border: 3px solid var(--amtc-border-color, #e5e5e5);
    border-top-color: var(--amtc-primary, #69a81d);
    border-radius: 50%;
    animation: amtc-spin 0.8s linear infinite;
}

@keyframes amtc-spin {
    to { transform: rotate(360deg); }
}

.amtc-empty-state {
    text-align: center;
    padding: 48px 24px;
    color: #6c757d;
    background: #f8f9fa;
    border-radius: 12px;
}

.amtc-empty-state p {
    margin: 0;
}


/* ==========================================================================
   Legacy Grid Styles (deprecated, kept for backwards compatibility)
   ========================================================================== */

.amtc-grid-card {
    background: #fff;
    border: 1px solid var(--amtc-border-color, #e5e5e5);
    border-radius: var(--amtc-card-radius, 8px);
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease;
}

.amtc-grid-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.amtc-grid-rating {
    display: flex;
    align-items: center;
    gap: 8px;
}

.amtc-stars {
    color: #ffc107;
    font-size: 1.1em;
    letter-spacing: 1px;
}

.amtc-rating-number {
    font-weight: 600;
    color: #333;
}

.amtc-grid-date {
    color: #888;
    font-size: 0.85em;
}

.amtc-grid-author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.amtc-author-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--amtc-primary, #69a81d), var(--amtc-primary-light, #8bc34a));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
}

.amtc-author-name {
    font-weight: 500;
    color: #333;
}

.amtc-grid-content {
    flex-grow: 1;
}

.amtc-summary {
    color: #555;
    font-style: italic;
    line-height: 1.5;
    margin-bottom: 10px;
}

.amtc-pros {
    color: var(--amtc-primary-dark, #2e7d32);
    margin: 5px 0;
    font-size: 0.9em;
}

.amtc-cons {
    color: #c62828;
    margin: 5px 0;
    font-size: 0.9em;
}

.amtc-grid-reaction {
    background: #f5f5f5;
    padding: 12px;
    border-radius: var(--amtc-card-inner-radius, 6px);
    margin-top: 12px;
    font-size: 0.9em;
}

.amtc-grid-reaction strong {
    color: #666;
    font-size: 0.85em;
}

.amtc-grid-reaction p {
    margin: 5px 0 0;
    color: #555;
}

.amtc-grid-recommend {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--amtc-divider-color, #eee);
    color: var(--amtc-primary-dark, #2e7d32);
    font-weight: 500;
    font-size: 0.9em;
}

/* Cart page reviews */
.amtc-cart-reviews {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid var(--amtc-border-color, #e5e5e5);
    width: 100%;
}

.amtc-cart-reviews .amtc-shop-reviews-carousel {
    margin-top: 0;
}

/* ==========================================================================
   Write Review Modal
   ========================================================================== */

body.amtc-modal-open {
    overflow: hidden;
}

.amtc-review-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
}

.amtc-review-modal.is-open {
    display: block;
}

.amtc-review-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.amtc-review-modal__dialog {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: var(--amtc-card-radius, 12px);
    width: calc(100% - 32px);
    max-width: 460px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    padding: 28px;
    /*box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);*/
}

.amtc-review-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: var(--amtc-card-text-secondary, #6c757d);
    cursor: pointer;
    padding: 4px;
}

.amtc-review-modal__close:hover {
    color: var(--amtc-card-text, #1a1a1a);
}

.amtc-review-modal__title {
    margin: 0 0 20px;
    font-size: 1.4em;
    color: var(--amtc-card-text, #1a1a1a);
}

.amtc-review-modal__field {
    margin-bottom: 16px;
}

.amtc-review-modal__label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.95em;
    color: var(--amtc-card-text, #1a1a1a);
}

.amtc-review-modal__required {
    color: #d63638;
}

.amtc-review-modal__form input[type="text"],
.amtc-review-modal__form input[type="email"],
.amtc-review-modal__form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--amtc-border-color, #ccc);
    border-radius: max(2px, calc(var(--amtc-card-radius, 12px) / 2));
    font-family: inherit;
    font-size: 1em;
    box-sizing: border-box;
}

.amtc-review-modal__form input:focus,
.amtc-review-modal__form textarea:focus {
    outline: none;
    border-color: var(--amtc-primary, #69a81d);
    /*box-shadow: 0 0 0 2px rgba(var(--amtc-primary-rgb, 105, 168, 29), 0.15);*/
}

/* Honeypot - visually hidden, must stay fillable for bots */
.amtc-review-modal__hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.amtc-review-modal__stars {
    display: flex;
    gap: 6px;
}

.amtc-review-modal__star {
    background: none;
    border: none;
    padding: 0;
    font-size: 30px;
    line-height: 1;
    color: #d5d5d5;
    cursor: pointer;
    transition: color 0.15s ease, transform 0.15s ease;
}

.amtc-review-modal__star:hover {
    transform: scale(1.1);
}

/* Selected/preview stars use the same yellow as review stars elsewhere,
   independent of the customizable primary color */
.amtc-review-modal__star.is-active {
    color: #ffc107;
}

/* Hover preview - stars fill up to the hovered one, the rest resets
   (overrides .is-active while previewing thanks to higher specificity) */
.amtc-review-modal__stars:has(.amtc-review-modal__star:hover) .amtc-review-modal__star {
    color: #ffc107;
}

.amtc-review-modal__stars .amtc-review-modal__star:hover ~ .amtc-review-modal__star {
    color: #d5d5d5;
}

.amtc-review-modal__error {
    margin-bottom: 14px;
    padding: 10px 12px;
    border-radius: 6px;
    background: #fdeaea;
    color: #b32d2e;
    font-size: 0.9em;
}

.amtc-review-modal__success {
    padding: 16px 0 4px;
    color: var(--amtc-primary-dark, #2e7d32);
    font-weight: 600;
    text-align: center;
}

.amtc-review-modal__submit {
    width: 100%;
}

/* Heading shown above shop-reviews fallback on product pages */
.amtc-reviews-fallback-heading {
    margin: 0 0 16px;
    font-size: 1.15em;
    font-weight: 600;
    color: var(--amtc-card-text, #1a1a1a);
}
