/* ============================================================
   lat_review / providers / tutors — Reviews section styles
   ============================================================ */

/* ----------------------------------------------------------
   Section wrapper
   ---------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:ital,wght@0,400..700;1,400..700&family=Noto+Sans:ital,wght@0,100..900;1,100..900&display=swap');
@import url("https://fonts.googleapis.com/css2?family=Figtree:ital,wght@0,300..900;1,300..900&family=Noto+Sans:ital,wght@0,100..900;1,100..900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap");

.lat-reviews-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e4e6ea;
    font-family: 'Figtree', sans-serif;
}

/* ----------------------------------------------------------
   Section header: title left, Post Review button right
   ---------------------------------------------------------- */
.lat-reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.lat-reviews-section h3 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    margin-bottom: 8px;
    font-family: 'Platform';
}

/* ----------------------------------------------------------
   Rating summary (left: big number + stars; right: bars)
   ---------------------------------------------------------- */
.lat-review-summary {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 40px;
}

.lat-review-summary-score {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 90px;
}

.lat-review-avg {
    font-size: 48px;
    font-family: 'Platform';
    color: #121117;
    font-weight: 700;
}

.lat-review-avg-stars {
    color: var(--text);
    font-size: 1.1rem;
    letter-spacing: 1px;
    margin-top: 4px;
}

.lat-review-star-filled {
    color: var(--text);
}

.lat-review-star-empty {
    color: #d1d5db;
}

.lat-review-total {
    font-size: 14px;
    font-family: 'Figtree', sans-serif;
    color: var(--text);
}

/* ----------------------------------------------------------
   Breakdown bars
   ---------------------------------------------------------- */
.lat-review-breakdown {
    flex: 1;
}

.lat-review-bar-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.lat-review-bar-label {
    font-size: 14px;
    color: var(--text);
    min-width: 12px;
    text-align: right;
}

.lat-review-bar-track {
    flex: 1;
    height: 8px;
    background: #F4F4F8;
    overflow: hidden;
    border: 1px solid var(--text);
}

.lat-review-bar-fill {
    height: 100%;
    background: var(--text);
    transition: width 0.4s ease;
}

.lat-review-bar-count {
    font-size: 14px;
    color: var(--text);
    min-width: 28px;
}

/* ----------------------------------------------------------
   Post review button
   ---------------------------------------------------------- */
.lat-review-post-btn {
    display: inline-flex;
    align-items: center;
    padding: 7px 16px;
    background: #fff;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    margin-block: 8px 16px;
}

/* ----------------------------------------------------------
   Review cards
   ---------------------------------------------------------- */
.row-g3>[class*="col-"] {
    margin-bottom: 16px;
}

.lat-review-card {
    background: #fff;
    /* border: 1px solid #e4e6ea;
    border-radius: 12px;
    padding: 1rem 1.2rem; */
    position: relative;
}

.lat-review-card.is-own {
    border-color: var(--border);
    background: var(--bg);
}

.lat-review-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.lat-review-card-avatar {
    width: 48px;
    height: 48px;
    border-radius: 7px;
    object-fit: cover;
    flex-shrink: 0;
}


.lat-review-card-meta {
    flex: 1;
}

.lat-review-card-name {
    font-weight: 600;
    font-size: 16px;
    color: #121117;

}

.lat-review-card-date {
    font-size: 14px;
    color: #4D4C5C;
}

/* Stars in card header */
.lat-review-star-filled {
    color: var(--text);
    font-size: 25px;
}

.lat-review-star-empty {
    color: #d1d5db;
    font-size: 25px;
}

.lat-review-card-body {
    font-size: 16px;
    color: var(--text);
    line-height: 1.6;
}

/* Show more button */
.lat-review-show-more {
    display: block;
    margin: 1.2rem auto 0;
    background: none;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    padding: 0.45rem 1.2rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.lat-review-show-more:hover {
    border-color: #6366f1;
    color: #4f46e5;
}

/* ----------------------------------------------------------
   Review modal overlay
   ---------------------------------------------------------- */
.lat-review-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1050;
    align-items: center;
    justify-content: center;
}

.lat-review-modal-overlay.active {
    display: flex;
}

.lat-review-modal {
    background: #fff;
    border-radius: 18px;
    padding: 1.5rem 1.5rem 1.2rem;
    max-width: 540px;
    width: min(92vw, 540px);
    box-shadow: 0 24px 56px rgba(17, 17, 17, 0.18);
    position: relative;
    border: 1px solid rgba(18, 17, 23, 0.08);
}

body.theme-dark .lat-review-modal,
body.theme-dark .lat-show-more-review-modal {
    background: var(--bg);
    border-color: var(--border);
    color: var(--text);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
}

.lat-review-modal-close {
    position: absolute;
    top: 0.9rem;
    right: 0.9rem;
    background: #fff;
    border: 1px solid rgba(18, 17, 23, 0.12);
    font-size: 1.45rem;
    color: #121117;
    cursor: pointer;
    line-height: 1;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    padding: 0;
    opacity: 1;
    box-shadow: 0 1px 0 rgba(17, 17, 17, 0.04);
}

.lat-review-modal-close:hover {
    transform: translateY(-1px);
    background: #f5f5f6;
    box-shadow: 0 8px 20px rgba(17, 17, 17, 0.08);
}

body.theme-dark .lat-review-modal-close,
body.theme-dark .lat-show-more-review-modal-close {
    color: #ffffff !important;
    background: rgba(18, 17, 23, 0.96) !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
}

@media (prefers-color-scheme: dark) {
    .lat-review-modal-close,
    .lat-show-more-review-modal-close {
        color: #ffffff !important;
        background: rgba(18, 17, 23, 0.96) !important;
        border: 1px solid rgba(255, 255, 255, 0.16) !important;
    }
}

.lat-review-modal-header {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 1.2rem;
    padding-right: 2.75rem;
}

.lat-review-modal-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(18, 17, 23, 0.06);
}

.lat-review-modal-title {
    font-size: 18px;
    line-height: 1.3;
    font-weight: 700;
    color: #121117;
}

/* Star selector */
.lat-review-star-selector {
    display: flex;
    gap: 0.45rem;
    margin-bottom: 1rem;
    align-items: center;
}

.lat-review-star-selector .lat-star {
    font-size: 2.15rem;
    color: #dfe2e8;
    cursor: pointer;
    transition: color 0.15s ease, transform 0.15s ease, filter 0.15s ease;
    line-height: 1;
    letter-spacing: 0.02em;
}

.lat-review-star-selector .lat-star.selected,
.lat-review-star-selector .lat-star.hovered {
    color: #121117;
    transform: scale(1.08);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.06));
}

/* Comment textarea */
.lat-review-modal-textarea {
    width: 100%;
    min-height: 112px;
    border: 1.5px solid rgba(17, 17, 17, 0.08);
    border-radius: 12px;
    padding: 0.8rem 0.9rem;
    font-size: 0.95rem;
    resize: vertical;
    font-family: inherit;
    color: #f5f5f7;
    background: #2d3036;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    box-sizing: border-box;
}

.lat-review-modal-textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.lat-review-modal-textarea:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
    background: #2d3036;
}

.lat-review-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.lat-review-modal-cancel {
    padding: 0.7rem 1.1rem;
    background: #fff;
    border: 1.5px solid rgba(18, 17, 23, 0.18);
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    color: #121117;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.lat-review-modal-cancel:hover {
    background: #F4F4F8;
    transform: translateY(-1px);
}

.lat-review-modal-submit {
    padding: 0.7rem 1.35rem;
    background: linear-gradient(180deg, #ff5e4d 0%, #ff4a3a 100%);
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    transition: filter 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 8px 18px rgba(255, 88, 60, 0.2);
}

.lat-review-modal-submit:hover {
    filter: brightness(0.98);
    transform: translateY(-1px);
}

.lat-review-modal-submit:disabled {
    background: #a5b4fc;
    cursor: not-allowed;
    box-shadow: none;
}

/* Error message */
.lat-review-error {
    color: var(--accent);
    font-size: 0.82rem;
    margin-top: 0.4rem;
    min-height: 1rem;
}

/* .lat-review-post-btn, */
.lat-review-edit-btn {
    width: 45px;
    height: 45px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}

.lat-review-post-btn:hover,
.lat-review-edit-btn:hover {
    background: #F4F4F8;
}

.lat-review-post-btn {
    border: 1px solid var(--border);
    border-radius: 8px;
    background-color: #fff;
}

/* show more modal */
.lat-show-more-reviews {
    color: #121117;
    font-weight: 500;
    font-size: 14px;
    margin-top: 12px;
    display: block;
    text-decoration: underline;
    cursor: pointer;
}

.lat-show-more-reviews:hover {
    color: #ff2500;
    font-weight: 600;
}

.lat-show-more-review-modal.active {
    display: block !important;
}

.lat-show-more-review-modal {
    position: fixed;
    display: none;
    top: 52%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    max-width: 40%;
    max-height: 90vh;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    overflow: hidden;
    min-width: 752px;
    border: 1px solid rgba(18, 17, 23, 0.08);
}

body.theme-dark .lat-show-more-review-modal {
    background: var(--bg);
    border-color: var(--border);
    color: var(--text);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
}

.lat-show-more-review-modal-close:hover {
    background: #f4f4f8;
}

.lat-show-more-review-modal-close {
    font-size: 30px;
    background: rgba(18, 17, 23, 0.04);
    border: 1px solid rgba(18, 17, 23, 0.12);
    cursor: pointer;
    margin-top: 0;
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 2;
    width: 33px;
    height: 33px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #121117;
    line-height: 1;
    font-weight: 700;
    padding: 0;
    opacity: 1;
}

body.theme-dark .lat-show-more-review-modal-close,
body.theme-dark .lat-show-more-review-modal .lat-show-more-review-modal-close {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    background: rgba(18, 17, 23, 0.96) !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

@media (prefers-color-scheme: dark) {
    .lat-show-more-review-modal .lat-show-more-review-modal-close,
    .lat-show-more-review-modal-close {
        color: #ffffff !important;
        -webkit-text-fill-color: #ffffff !important;
        background: rgba(18, 17, 23, 0.96) !important;
        border: 1px solid rgba(255, 255, 255, 0.16) !important;
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
    }
}

.lat-show-more-review-modal-body {
    padding: 32px;
    color: #121117;
    overflow-y: auto;
    max-height: calc(100vh - 64px);
    overflow: auto;
    padding-bottom: 0;
    scrollbar-width: none;
}

body.theme-dark .lat-show-more-review-modal-body,
body.theme-dark .lat-show-more-review-modal-body h3,
body.theme-dark .lat-show-more-review-modal-avg,
body.theme-dark .lat-show-more-review-modal-total,
body.theme-dark .lat-show-more-review-modal-bars li > span,
body.theme-dark .lat-show-more-review-modal-review-text,
body.theme-dark .lat-show-more-review-modal-review-date,
body.theme-dark .lat-show-more-review-modal-reviewer-name,
body.theme-dark .lat-show-more-review-modal-review-stars {
    color: var(--text);
}

.lat-show-more-review-modal-body h3 {
    display: flex;
    align-items: center;
    gap: 2px;
    font-weight: 700;
    font-size: 32px;
    color: #121117;
    font-family: "Platform";
}

.lat-show-more-review-modal-ratings-box {
    display: flex;
    flex-direction: column;
    height: 96px;
    justify-content: space-between;
}

.lat-show-more-review-modal-avg {
    max-height: 44px;
    margin-top: -15px;
    font-size: 64px;
    font-weight: 700;
    color: #121117;
    font-family: "Platform"
}

.lat-show-more-review-modal-stars {
    font-size: 20px;
    color: #000;
    margin-top: 12px;
}

.lat-show-more-review-modal-total {
    color: #4D4C5C;
    font-size: 16px;
    font-weight: 400;
}

.lat-show-more-review-modal-bars {
    list-style: none;
    padding: 0;
}

.lat-show-more-review-modal-bars li {
    display: flex;
    align-items: center;
    max-height: 20px;
}

.lat-show-more-review-modal-bars li>span:first-child {
    width: 16px;
}

.lat-show-more-review-modal-bars li>span {
    width: 16px;
    font-size: 14px;
    font-family: "Figtree", serif;
    color: #121117;
}

.lat-show-more-review-modal-bar-bg {
    flex: 1;
    height: 8px;
    background: #F4F4F8;
    overflow: hidden;
    border: 1px solid #121117;
}

.lat-show-more-review-modal-bar-fill {
    height: 100%;
    background: #1d1d1f;
}

.lat-show-more-review-modal-reviews {
    margin-bottom: 24px;
}

.lat-show-more-review-modal-review-item {
    padding-block: 16px;
    border-top: 1px solid #DCDCE5;
}

.lat-show-more-review-modal-review-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    justify-content: start !important;
}

.lat-show-more-review-modal-review-avatar {
    width: 48px;
    height: 48px;
    object-fit: cover;
    margin-right: 16px;
}

.lat-show-more-review-modal-edit-review-btn:hover {
    background: #F4F4F8;
}

.lat-show-more-review-modal-edit-review-btn {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 2px solid #DCDCE5;
    gap: 12px;
    font-family: "Figtree", serif;
    color: #121117;
    font-size: 16px;
    font-weight: 600;
    min-width: 100px;
    background: transparent;
    cursor: pointer;
}

.lat-show-more-review-modal-review-stars {
    color: #000;
    margin-bottom: 8px;
    font-size: 22px;
}

.lat-show-more-review-modal-review-text {
    font-size: 16px;
    color: #121117;
}

.lat-show-more-review-modal-reviewe-date {
    font-size: 0.85rem;
    color: #6e6e73;
}

.lat-show-more-review-modal-reviewer-name {
    font-weight: 600;
    font-size: 16px;
}

.testimonial-card.reviews {
    height: 80px;
    padding-block: 8px;
}

.lat-show-more-review-modal-review-date {
    font-size: 14px;
    color: #4D4C5C;
}

.tutor-info-wrapper {
    gap: 8px;
}

.tutor-info {
    padding: 4px 8px;
    background: #F4F4F8;
    border-radius: 4px;
    color: #121117;
    font-size: 12px;
    font-weight: 400;
}
/* show more modal */

@media (max-width: 768px) {
    /* show more modal  */

    #page:has(.lat-show-more-review-modal.active) {
        overflow: hidden;
        height: 100vh;
    }

    .lat-show-more-review-modal-title {
        padding-block: 16px;
        font-size: 18px !important;
        margin-bottom: 0 !important;
        position: sticky;
        margin-left: -16px;
        width: 100vw;
        background: var(--bg);
        padding-inline: 16px;
    }

    .lat-show-more-review-modal-close {
        z-index: 1;
    }

    .lat-show-more-review-modal {
        min-width: auto;
        width: 100%;
        height: auto;
        min-height: auto;
        max-height: none;
        top: 0;
        left: 0;
        transform: none;
        max-width: none;
    }

    .lat-show-more-review-modal-avg {
        font-family: inherit;
        font-weight: 700;
        font-size: 40px;
    }

    .lat-show-more-review-modal-bars li>span {
        font-family: inherit;
    }

    .lat-show-more-review-modal-body {
        padding: 0px 16px 16px 16px;
        max-height: none;
        overflow: auto;
        height: calc(100vh - 82px);
    }

    .lat-show-more-review-modal-review-item {
        border: 1px solid var(--border);
        border-radius: 8px;
        margin-bottom: 16px;
        padding: 16px;
    }

    /* show more moda  */
    .row-g3>[class*="col-"] {
        padding: 16px !important;
        border-radius: 8px;
        border: 1px solid #DCDCE5;
        flex: 0 0 301px;
    }

    .lat-review-cards {
        margin: 0 !important;
        gap: 16px;
        overflow-x: auto;
        flex-direction: row;
        flex-wrap: nowrap;
        max-width: calc(100vw - 42px);
        scrollbar-width: none;
    }

    .mobile-carousel {
        width: 100%;
        overflow-x: auto;
    }

    .lat-review-card-avatar {
        width: 40px;
        height: 40px;
    }

    .lat-review-card-name {
        font-weight: 500;
        font-size: 14px;
    }

    .lat-review-edit-btn {
        width: 40px;
        height: 40px;
    }

    .lat-show-more-reviews {
        font-weight: 600;
    }

}
