/* ========================================================================
VADEVISE — REVIEW SYSTEM
Entity-page review section
Frontend foundation / empty state / review form
======================================================================== */


/* ========================================================================
REVIEW SECTION
======================================================================== */

.reviews-section {
    width: 100%;
    max-width: 900px;
    margin: 2rem auto;
    padding: 1.5rem;

    background: var(--vv-surface);
    border: 1px solid var(--vv-border);
    border-radius: 16px;

    box-sizing: border-box;
}


/* ========================================================================
REVIEW HEADER
======================================================================== */

.reviews-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
}

.reviews-header h2 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--vv-text);
}

.reviews-count {
    font-size: 0.9rem;
    font-weight: 500;
    color: #aa5c03;
}


/* ========================================================================
EMPTY STATE
======================================================================== */

/*
* The empty state is already communicated beside the heading:
*
* User reviews (No reviews yet)
*
* Therefore the separate empty paragraph remains hidden.
*/

.reviews-empty {
    display: none;
}


/* ========================================================================
REVIEW INVITATION
======================================================================== */

.reviews-invitation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;

    padding: 1.25rem;

    background: var(--vv-surface);
    border: 1px solid #e5d9f5;
    border-radius: 12px;
}

.reviews-invitation-content {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;

    flex: 1;
    min-width: 0;
}


/* ========================================================================
REVIEW INVITATION ICON
======================================================================== */

.reviews-invitation-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 32px;
    height: 32px;

    flex-shrink: 0;

    border-radius: 8px;

    background: #f1eafd;
    color: #7c3aed;

    font-size: 1rem;
    line-height: 1;
}

.reviews-invitation-icon span {
    display: block;
    transform: rotate(-45deg);
}


/* ========================================================================
REVIEW INVITATION TEXT
======================================================================== */

.reviews-invitation-text {
    flex: 1;
    min-width: 0;
}

.reviews-invitation h3 {
    margin: 0 0 0.35rem;

    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;

    color: var(--vv-text);
}

.reviews-invitation p {
    margin: 0;

    font-size: 0.9rem;
    line-height: 1.5;

    color: var(--vv-text-secondary);
}


/* ========================================================================
REVIEW GUIDELINE
======================================================================== */

.reviews-guideline {
    margin: 8px 0 0;
    padding: 8px 20px;

    font-size: 11px;
    line-height: 1.45;

    color: var(--vv-text-muted);
    background: var(--vv-surface-soft);

    border-radius: 3px;
}


/* ========================================================================
LEAVE REVIEW BUTTON
======================================================================== */

.reviews-leave-button {
    flex-shrink: 0;

    padding: 0.65rem 1rem;

    border: 1px solid #7c3aed;
    border-radius: 8px;

    background: var(--vv-surface);
    color: #6d28d9;

    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;

    cursor: pointer;

    transition:
        background-color 0.15s ease,
        color 0.15s ease,
        border-color 0.15s ease,
        transform 0.15s ease;
}

.reviews-leave-button:hover {
    background: #7c3aed;
    border-color: #7c3aed;
    color: #ffffff;
}

.reviews-leave-button:active {
    transform: translateY(1px);
}

.reviews-leave-button:focus-visible {
    outline: 2px solid #7c3aed;
    outline-offset: 3px;
}


/* ========================================================================
REVIEW FORM
======================================================================== */

.review-form {
    margin-top: 1rem;
    padding: 1.25rem;

    background: var(--vv-surface);
    border: 1px solid #e5d9f5;
    border-radius: 12px;

    box-sizing: border-box;
}


/* ========================================================================
REVIEW FORM HEADER
======================================================================== */

.review-form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;

    margin-bottom: 1.25rem;
}

.review-form-header h3 {
    margin: 0;

    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.4;

    color: var(--vv-text);
}


/* ========================================================================
CLOSE BUTTON
======================================================================== */

.review-form-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 32px;
    height: 32px;

    padding: 0;

    border: 1px solid var(--vv-border);
    border-radius: 7px;

    background: var(--vv-surface);
    color: var(--vv-text-secondary);

    font: inherit;
    font-size: 1.1rem;
    line-height: 1;

    cursor: pointer;

    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;
}

.review-form-close:hover {
    background: var(--vv-surface-soft);
    border-color: var(--vv-border);
    color: var(--vv-text);
}

.review-form-close:focus-visible {
    outline: 2px solid #7c3aed;
    outline-offset: 2px;
}


/* ========================================================================
FORM CONTENT
======================================================================== */

.review-form-content {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}


/* ========================================================================
ALREADY REVIEWED MESSAGE
======================================================================== */

.review-already-message {
    margin: 0 0 1rem;
    padding: 0.7rem 0.85rem;

    border: 1px solid #f0b4b4;
    border-radius: 7px;

    background: #fff5f5;
    color: #c62828;

    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.45;
}


/* ========================================================================
RATE LIMIT MESSAGE
======================================================================== */

.review-rate-limit-message {
    margin: 0 0 1rem;
    padding: 0.7rem 0.85rem;

    border: 1px solid #f0b4b4;
    border-radius: 7px;

    background: #fff5f5;
    color: #c62828;

    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.45;
}


/* ========================================================================
PROHIBITED CONTENT MESSAGE
======================================================================== */

.review-prohibited-message {
    margin: 0 0 1rem;
    padding: 0.7rem 0.85rem;

    border: 1px solid #f0b4b4;
    border-radius: 7px;

    background: #fff5f5;
    color: #c62828;

    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.45;
}


/* ========================================================================
RATING
======================================================================== */

.review-rating {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.review-rating-title {
    margin: 0;

    font-size: 0.9rem;
    font-weight: 600;

    color: var(--vv-text);
}


/* ========================================================================
STAR CONTAINER
======================================================================== */

.review-stars {
    display: flex;
    align-items: center;
    gap: 0.15rem;
}


/* ========================================================================
INDIVIDUAL STAR
======================================================================== */

.review-star {
    width: 38px;
    height: 38px;

    padding: 0;
    border: 0;

    background: transparent;
    color: #f4b942;

    font-family: Arial, sans-serif;
    font-size: 2rem;
    line-height: 1;

    cursor: pointer;

    transition:
        color 0.12s ease,
        transform 0.12s ease;
}

.review-star:hover {
    color: #e6a52f;
    transform: scale(1.08);
}

.review-star:focus-visible {
    outline: 2px solid #7c3aed;
    outline-offset: 2px;
    border-radius: 5px;
}


/* ========================================================================
EXPERIENCE FIELD
======================================================================== */

.review-form-field {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.review-form-field label {
    font-size: 0.9rem;
    font-weight: 600;

    color: var(--vv-text);
}

.review-form-field textarea {
    width: 100%;
    min-height: 130px;

    padding: 0.8rem;

    border: 1px solid var(--vv-border);
    border-radius: 8px;

    background: var(--vv-surface);
    color: var(--vv-text);

    font: inherit;
    font-size: 0.9rem;
    line-height: 1.5;

    resize: vertical;
    box-sizing: border-box;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.review-form-field textarea::placeholder {
    color: var(--vv-text-muted);
}

.review-form-field textarea:focus {
    border-color: #7c3aed;
    outline: none;

    box-shadow:
        0 0 0 2px rgba(124, 58, 237, 0.12);
}


/* ========================================================================
FORM ACTIONS
======================================================================== */

.review-form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
}


/* ========================================================================
CANCEL BUTTON
======================================================================== */

.review-form-cancel {
    padding: 0.65rem 1rem;

    border: 1px solid var(--vv-border);
    border-radius: 8px;

    background: var(--vv-surface);
    color: var(--vv-text-secondary);

    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;

    cursor: pointer;

    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;
}

.review-form-cancel:hover {
    background: var(--vv-surface-soft);
    border-color: var(--vv-border);
    color: var(--vv-text);
}

.review-form-cancel:focus-visible {
    outline: 2px solid #7c3aed;
    outline-offset: 2px;
}


/* ========================================================================
SUBMIT BUTTON
======================================================================== */

.review-form-submit {
    padding: 0.65rem 1rem;

    border: 1px solid #7c3aed;
    border-radius: 8px;

    background: #7c3aed;
    color: #ffffff;

    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;

    cursor: pointer;

    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        transform 0.15s ease;
}

.review-form-submit:hover {
    background: #6d28d9;
    border-color: #6d28d9;
}

.review-form-submit:active {
    transform: translateY(1px);
}

.review-form-submit:focus-visible {
    outline: 2px solid #7c3aed;
    outline-offset: 3px;
}


/* ========================================================================
PUBLIC REVIEWS
======================================================================== */

.reviews-list {
    display: flex;
    flex-direction: column;

    gap: 0.25rem;
    margin-bottom: 1rem;
}


/* ========================================================================
REVIEW CARD
======================================================================== */

.review-card {
    width: 100%;

    padding: 0.85rem 0;

    background: transparent;
    border: 0;

    box-sizing: border-box;
}


/* ========================================================================
REVIEWER
======================================================================== */

.review-card-user {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
}


/* ========================================================================
REVIEWER AVATAR
======================================================================== */

.review-card-avatar {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 40px;
    height: 40px;

    flex-shrink: 0;

    border-radius: 50%;

    background: #f1eafd;
    color: #6d28d9;

    font-size: 0.9rem;
    font-weight: 600;

    object-fit: cover;
}

.review-card-avatar-placeholder {
    background: #f1eafd;
}


/* ========================================================================
REVIEWER CONTENT
======================================================================== */

.review-card-content {
    flex: 1;
    min-width: 0;
}


/* ========================================================================
REVIEWER INFORMATION
======================================================================== */

.review-card-meta {
    display: flex;
    align-items: baseline;
    gap: 0.45rem;

    min-width: 0;
}

.review-card-meta strong {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;

    color: var(--vv-text);
}

.review-card-meta span {
    font-size: 0.78rem;
    line-height: 1.3;

    color: var(--vv-text-muted);
}


/* ========================================================================
REVIEW RATING
======================================================================== */

.review-card-rating {
    color: #f38d09;

    font-size: 1.2rem;
    line-height: 1;
    letter-spacing: 0.08rem;
}


/* ========================================================================
REVIEW TEXT
======================================================================== */

.review-card-text {
    margin-top: 0.55rem;
    margin-left: 0;

    font-size: 0.9rem;
    line-height: 1.5;

    color: var(--vv-text-secondary);

    white-space: pre-wrap;
    overflow-wrap: anywhere;
}


/* ========================================================================
PUBLIC REVIEW MOBILE
======================================================================== */

@media (max-width: 699px) {

    .reviews-list {
        gap: 0.75rem;
        margin-bottom: 0.85rem;
    }

    .review-card {
        padding: 0.9rem 0;
    }

    .review-card-user {
        gap: 0.6rem;
    }

    .review-card-avatar {
        width: 36px;
        height: 36px;
        font-size: 0.82rem;
    }

    .review-card-meta strong {
        font-size: 0.85rem;
    }

    .review-card-meta span {
        font-size: 0.74rem;
    }

    .review-card-rating {
        font-size: 1rem;
    }

    .review-card-text {
        margin-left: 0;
        margin-top: 0.55rem;

        font-size: 0.85rem;
        line-height: 1.55;
    }
}


/* ========================================================================
MOBILE
======================================================================== */

@media (max-width: 699px) {

    .reviews-section {
        margin: 1.5rem 0;
        padding: 1rem;

        border-radius: 14px;
    }

    .reviews-header {
        margin-bottom: 1rem;
        gap: 0.5rem;
    }

    .reviews-header h2 {
        font-size: 1.15rem;
    }

    .reviews-count {
        font-size: 0.82rem;
    }

    .reviews-invitation-content {
        width: 100%;
        align-items: flex-start;
    }

    .reviews-invitation {
        align-items: flex-start;
        flex-direction: column;

        gap: 1rem;
        padding: 1rem;
    }

    .reviews-invitation h3 {
        font-size: 0.95rem;
    }

    .reviews-invitation p {
        font-size: 0.85rem;
    }

    .reviews-leave-button {
        width: 100%;
        text-align: center;
    }

    .review-form {
        margin-top: 1rem;
        padding: 1rem;
    }

    .review-form-header {
        margin-bottom: 1rem;
    }

    .review-form-header h3 {
        font-size: 1rem;
    }

    .review-stars {
        gap: 0.1rem;
    }

    .review-star {
        width: 36px;
        height: 36px;
        font-size: 1.9rem;
    }

    .review-form-field textarea {
        min-height: 120px;
        font-size: 16px;
    }

    .review-form-actions {
        width: 100%;
        justify-content: stretch;
    }

    .review-form-cancel,
    .review-form-submit {
        flex: 1;
    }
}