/**
 * Aromatica Reviews - Styles
 * 
 * Professional design with gold accent (#d4a65a)
 * 
 * @package Aromatica_Reviews
 */

/* ==========================================================================
   CSS Variables
   ========================================================================== */

:root {
    --ar-primary: #d4a65a;
    --ar-primary-hover: #c99b4a;
    --ar-primary-light: rgba(212, 166, 90, 0.1);
    --ar-primary-border: rgba(212, 166, 90, 0.3);
    --ar-text: #333;
    --ar-text-light: #666;
    --ar-text-muted: #999;
    --ar-placeholder: #aaa;
    --ar-bg: #fff;
    --ar-bg-light: #f9f9f9;
    --ar-border: #ddd;
    --ar-star-empty: #ddd;
    --ar-star-filled: #d4a65a;
    --ar-success: #28a745;
    --ar-error: #dc3545;
    --ar-radius: 10px;
    --ar-radius-lg: 14px;
    --ar-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    --ar-shadow-lg: 0 4px 24px rgba(0, 0, 0, 0.1);
    --ar-transition: all 0.3s ease;
}

/* ==========================================================================
   Reviews Section Container
   ========================================================================== */

.ar-reviews-section {
    padding: 20px 0;
}

/* ==========================================================================
   Summary Section
   ========================================================================== */

.ar-reviews-summary {
    display: flex;
    gap: 40px;
    padding: 25px;
    background: var(--ar-bg);
    border: 1px solid var(--ar-border);
    border-radius: var(--ar-radius-lg);
    margin-bottom: 30px;
    box-shadow: var(--ar-shadow);
}

.ar-summary-global {
    flex-shrink: 0;
    text-align: center;
    padding-right: 40px;
    border-right: 1px solid var(--ar-border);
}

.ar-global-score {
    font-size: 48px;
    font-weight: 700;
    color: var(--ar-text);
    line-height: 1;
    margin-bottom: 8px;
}

.ar-global-max {
    font-size: 24px;
    color: var(--ar-text-muted);
    font-weight: 400;
}

.ar-global-stars {
    margin-bottom: 8px;
}

.ar-global-count {
    font-size: 14px;
    color: var(--ar-text-light);
}

.ar-summary-criteria {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ar-criteria-bar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ar-criteria-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.ar-criteria-label {
    width: 180px;
    flex-shrink: 0;
    font-size: 13px;
    color: var(--ar-text);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ar-criteria-progress {
    flex: 1;
    height: 8px;
    background: var(--ar-bg-light);
    border-radius: 4px;
    overflow: hidden;
}

.ar-criteria-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--ar-primary) 0%, var(--ar-primary-hover) 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.ar-criteria-value {
    width: 40px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ar-text);
    text-align: right;
}

/* ==========================================================================
   Review Form
   ========================================================================== */

.ar-review-form-wrapper {
    background: var(--ar-bg);
    border: 1px solid var(--ar-border);
    border-radius: var(--ar-radius-lg);
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: var(--ar-shadow);
}

.ar-form-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--ar-text);
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--ar-border);
}

/* Ratings Grid */
.ar-form-ratings {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.ar-rating-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: var(--ar-bg-light);
    border-radius: var(--ar-radius);
    border: 1px solid var(--ar-border);
    transition: var(--ar-transition);
}

.ar-rating-row:hover {
    border-color: var(--ar-primary-border);
}

.ar-rating-row.selected {
    border-color: var(--ar-primary);
    background: var(--ar-primary-light);
}

.ar-rating-label {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: var(--ar-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.ar-rating-icon {
    font-size: 18px;
}

.ar-rating-stars {
    display: flex;
    gap: 4px;
}

.ar-rating-stars .ar-star {
    font-size: 22px;
    color: var(--ar-star-empty);
    cursor: pointer;
    transition: var(--ar-transition);
    user-select: none;
}

.ar-rating-stars .ar-star:hover,
.ar-rating-stars .ar-star.hover {
    color: var(--ar-primary);
    transform: scale(1.15);
}

.ar-rating-stars .ar-star.active {
    color: var(--ar-star-filled);
}

.ar-rating-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--ar-text-muted);
    min-width: 30px;
    text-align: right;
}

.ar-rating-row.selected .ar-rating-value {
    color: var(--ar-primary);
}

/* Form Fields */
.ar-form-field {
    margin-bottom: 20px;
}

.ar-form-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--ar-text);
    margin-bottom: 8px;
}

.ar-form-field label .required {
    color: var(--ar-primary);
}

.ar-form-field textarea,
.ar-form-field input[type="text"],
.ar-form-field input[type="tel"] {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    color: var(--ar-text);
    background: var(--ar-bg);
    border: 2px solid var(--ar-border);
    border-radius: var(--ar-radius);
    transition: var(--ar-transition);
    font-family: inherit;
}

.ar-form-field textarea::placeholder,
.ar-form-field input::placeholder {
    color: var(--ar-placeholder);
    font-weight: 400;
}

.ar-form-field textarea:focus,
.ar-form-field input:focus {
    outline: none;
    border-color: var(--ar-primary);
    box-shadow: 0 0 0 4px var(--ar-primary-light);
}

.ar-form-field textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.5;
}

.ar-form-field input[readonly] {
    background: var(--ar-bg-light);
    color: var(--ar-text-light);
    cursor: not-allowed;
}

/* Form Row (Name + Phone) */
.ar-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.ar-form-half {
    flex: 1;
    margin-bottom: 0;
}

/* Phone Wrapper */
.ar-phone-wrapper {
    display: flex;
    align-items: center;
    background: var(--ar-bg);
    border: 2px solid var(--ar-border);
    border-radius: var(--ar-radius);
    overflow: hidden;
    transition: var(--ar-transition);
}

.ar-phone-wrapper:focus-within {
    border-color: var(--ar-primary);
    box-shadow: 0 0 0 4px var(--ar-primary-light);
}

.ar-phone-prefix {
    padding: 14px 16px;
    background: var(--ar-bg-light);
    font-size: 16px;
    border-right: 2px solid var(--ar-border);
    flex-shrink: 0;
}

.ar-phone-wrapper input {
    border: none !important;
    box-shadow: none !important;
    flex: 1;
    padding: 14px 16px !important;
    font-size: 15px !important;
    background: transparent !important;
}

.ar-phone-wrapper input::placeholder {
    color: var(--ar-placeholder);
}

.ar-phone-wrapper input:focus {
    box-shadow: none !important;
    outline: none !important;
}

/* Submit Button */
.ar-form-submit {
    margin-top: 25px;
}

.ar-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 40px;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #000;
    background: linear-gradient(135deg, var(--ar-primary) 0%, var(--ar-primary-hover) 100%);
    border: none;
    border-radius: var(--ar-radius);
    cursor: pointer;
    transition: var(--ar-transition);
    box-shadow: 0 4px 15px rgba(212, 166, 90, 0.3);
}

.ar-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 166, 90, 0.4);
}

.ar-submit-btn:active {
    transform: translateY(0);
}

.ar-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Form Message */
.ar-form-message {
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: var(--ar-radius);
    font-size: 14px;
    display: none;
}

.ar-form-message.success {
    display: block;
    background: rgba(40, 167, 69, 0.1);
    color: var(--ar-success);
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.ar-form-message.error {
    display: block;
    background: rgba(220, 53, 69, 0.1);
    color: var(--ar-error);
    border: 1px solid rgba(220, 53, 69, 0.3);
}

/* ==========================================================================
   Reviews List
   ========================================================================== */

.ar-reviews-list {
    margin-top: 30px;
}

.ar-list-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--ar-text);
    margin: 0 0 20px 0;
}

.ar-review-item {
    background: var(--ar-bg);
    border: 1px solid var(--ar-border);
    border-radius: var(--ar-radius-lg);
    padding: 20px;
    margin-bottom: 15px;
    transition: var(--ar-transition);
}

.ar-review-item:hover {
    box-shadow: var(--ar-shadow);
}

.ar-review-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.ar-review-stars {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ar-review-score {
    font-size: 14px;
    font-weight: 600;
    color: var(--ar-primary);
}

.ar-review-author {
    font-weight: 600;
    color: var(--ar-text);
}

.ar-review-phone {
    font-weight: 400;
    color: var(--ar-text-muted);
    font-size: 13px;
}

.ar-review-date {
    margin-left: auto;
    font-size: 13px;
    color: var(--ar-text-muted);
}

.ar-review-content {
    font-size: 14px;
    line-height: 1.6;
    color: var(--ar-text);
    margin-bottom: 15px;
}

.ar-review-criteria {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.ar-review-criteria-item {
    font-size: 13px;
    color: var(--ar-text-light);
    padding: 4px 10px;
    background: var(--ar-bg-light);
    border-radius: 15px;
}

/* No Reviews */
.ar-no-reviews {
    text-align: center;
    padding: 40px 20px;
    color: var(--ar-text-muted);
}

/* ==========================================================================
   Phone Notice (Reassurance Message)
   ========================================================================== */

.ar-phone-notice {
    font-size: 11px;
    color: var(--ar-text-muted);
    margin-top: 8px;
    margin-bottom: 0;
    line-height: 1.5;
    padding: 8px 10px;
    background: rgba(40, 167, 69, 0.08);
    border-radius: 6px;
    border-left: 3px solid #28a745;
}

/* ==========================================================================
   Verified Buyer Badge (Facebook Style)
   ========================================================================== */

.ar-verified-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    padding: 3px 10px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    color: #fff !important;
    background: #25D366 !important;
    border-radius: 20px !important;
    margin-left: 8px !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    vertical-align: middle !important;
}

.ar-verified-badge::before {
    content: "" !important;
    display: inline-block !important;
    width: 12px !important;
    height: 12px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E") !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
}

/* ==========================================================================
   Stars Display
   ========================================================================== */

.ar-stars-display {
    display: inline-flex;
    gap: 2px;
}

.ar-stars-display .ar-star {
    font-size: 18px;
}

.ar-stars-display .ar-star.filled {
    color: var(--ar-star-filled);
}

.ar-stars-display .ar-star.half {
    color: var(--ar-star-filled);
    opacity: 0.7;
}

.ar-stars-display .ar-star.empty {
    color: var(--ar-star-empty);
}

/* ==========================================================================
   Loop & Single Rating
   ========================================================================== */

.ar-loop-rating,
.ar-single-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 5px 0;
}

.ar-mini-stars {
    display: inline-flex;
    gap: 1px;
    font-size: 14px;
}

.ar-mini-stars .filled {
    color: var(--ar-star-filled);
}

.ar-mini-stars .empty {
    color: var(--ar-star-empty);
}

.ar-loop-count,
.ar-single-link {
    font-size: 12px;
    color: var(--ar-text-muted);
}

.ar-single-score {
    font-size: 14px;
    font-weight: 600;
    color: var(--ar-primary);
}

.ar-single-link {
    text-decoration: underline;
}

.ar-single-link:hover {
    color: var(--ar-primary);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .ar-reviews-summary {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }

    .ar-summary-global {
        padding-right: 0;
        padding-bottom: 15px;
        border-right: none;
        border-bottom: 1px solid var(--ar-border);
    }

    .ar-global-score {
        font-size: 36px;
    }

    .ar-criteria-bar {
        gap: 8px;
    }

    .ar-criteria-icon {
        font-size: 16px;
        width: 20px;
    }

    .ar-criteria-label {
        min-width: 90px;
        max-width: 120px;
        font-size: 12px;
    }

    .ar-criteria-value {
        font-size: 12px;
        min-width: 35px;
    }

    .ar-form-ratings {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .ar-rating-row {
        flex-direction: column;
        align-items: center;
        padding: 15px;
        gap: 10px;
    }

    .ar-rating-label {
        font-size: 14px;
        justify-content: center;
    }

    .ar-rating-stars {
        justify-content: center;
    }

    .ar-rating-stars .ar-star {
        font-size: 28px;
    }

    .ar-rating-value {
        text-align: center;
        font-size: 14px;
    }

    .ar-form-row {
        flex-direction: column;
        gap: 12px;
    }

    .ar-form-half {
        width: 100%;
    }

    .ar-form-field label {
        font-size: 13px;
    }

    .ar-form-field textarea,
    .ar-form-field input[type="text"],
    .ar-form-field input[type="tel"] {
        padding: 12px;
        font-size: 14px;
    }

    .ar-review-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .ar-review-date {
        margin-left: 0;
        font-size: 11px;
    }

    .ar-review-content {
        font-size: 13px;
    }

    .ar-review-criteria {
        flex-wrap: wrap;
        gap: 6px;
    }

    .ar-review-criteria-item {
        font-size: 11px;
        padding: 4px 8px;
    }

    .ar-submit-btn {
        width: 100%;
        padding: 14px;
        font-size: 15px;
    }

    .ar-review-form-wrapper,
    .ar-reviews-list {
        padding: 15px;
    }

    .ar-review-item {
        padding: 15px;
    }

    /* Phone notice responsive */
    .ar-phone-notice {
        font-size: 10px;
        padding: 6px 8px;
    }

    /* Verified badge responsive */
    .ar-verified-badge {
        font-size: 9px;
        padding: 2px 6px;
        margin-left: 5px;
    }

    .ar-verified-badge::before {
        width: 10px;
        height: 10px;
    }

    .ar-review-author {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .ar-summary-criteria {
        gap: 8px;
    }

    .ar-criteria-bar {
        flex-wrap: wrap;
    }

    .ar-criteria-label {
        min-width: 100%;
        max-width: 100%;
        order: -1;
        margin-bottom: 4px;
    }

    .ar-criteria-progress {
        order: 1;
        flex: 1;
    }

    .ar-criteria-value {
        order: 2;
    }

    .ar-global-score {
        font-size: 32px;
    }

    .ar-rating-stars .ar-star {
        font-size: 20px;
    }
}