/**
 * Next Level Study - On-Demand Tutor Marketplace Stylesheet (Gojek-like Super-App)
 * Version: 2026.09.15-v2
 */

/* ==========================================================================
   1. BASE & CONTAINER SYSTEM
   ========================================================================== */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}
.privat-app-wrap {
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #0f172a;
}
html.dark .privat-app-wrap {
    color: #f8fafc;
}

/* Container limits */
.nls-container {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}
@media (min-width: 640px) {
    .nls-container { padding-left: 1.5rem; padding-right: 1.5rem; }
}
@media (min-width: 1024px) {
    .nls-container { padding-left: 2rem; padding-right: 2rem; }
}

/* ==========================================================================
   2. HERO SECTION & BADGES
   ========================================================================== */
.nls-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 18px;
    background: #e0f2fe;
    border: 1.5px solid #bae6fd;
    border-radius: 9999px;
    color: #0284c7;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
html.dark .nls-hero-badge {
    background: rgba(2, 132, 199, 0.15);
    border-color: rgba(2, 132, 199, 0.4);
    color: #38bdf8;
}

.nls-hero-title {
    font-size: 2rem;
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: #0f172a;
    margin-top: 1rem;
    margin-bottom: 1rem;
}
@media (min-width: 640px) {
    .nls-hero-title { font-size: 3rem; }
}
@media (min-width: 1024px) {
    .nls-hero-title { font-size: 3.75rem; }
}
html.dark .nls-hero-title {
    color: #ffffff;
}

.nls-hero-subtitle {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #475569;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 500;
}
@media (min-width: 640px) {
    .nls-hero-subtitle { font-size: 1.125rem; }
}
html.dark .nls-hero-subtitle {
    color: #cbd5e1;
}

/* ==========================================================================
   3. GOJEK SUPER-APP SEARCH CONSOLE
   ========================================================================== */
.nls-search-console {
    position: relative;
    z-index: 30;
    overflow: visible;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 28px;
    padding: 20px;
    box-shadow: 0 20px 45px -15px rgba(0, 75, 112, 0.14), 0 0 1px rgba(0, 0, 0, 0.06);
    max-width: 1040px;
    margin-left: auto;
    margin-right: auto;
}
@media (min-width: 640px) {
    .nls-search-console { padding: 28px; }
}
html.dark .nls-search-console {
    background: #111a33;
    border-color: #1e293b;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
}

/* Search input box */
.nls-search-input-wrap {
    position: relative;
    width: 100%;
}
.nls-search-input {
    width: 100%;
    padding: 14px 44px 14px 48px;
    border-radius: 18px;
    background: #f8fafc;
    border: 2px solid #cbd5e1;
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    transition: all 0.2s ease;
    box-sizing: border-box;
}
.nls-search-input:focus {
    background: #ffffff;
    border-color: #0284c7;
    outline: none;
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.15);
}
html.dark .nls-search-input {
    background: #0a0f1d;
    border-color: #334155;
    color: #ffffff;
}
html.dark .nls-search-input:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.15);
}

/* Mode switcher buttons (Online vs Tatap Muka) */
.nls-mode-btn {
    padding: 9px 18px;
    border-radius: 14px;
    font-size: 12.5px;
    font-weight: 800;
    border: 1.5px solid #cbd5e1;
    background: #f1f5f9;
    color: #334155;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.nls-mode-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}
.nls-mode-btn.active-all {
    background: #004B70 !important;
    color: #ffffff !important;
    border-color: #004B70 !important;
    box-shadow: 0 4px 14px rgba(0, 75, 112, 0.3) !important;
}
.nls-mode-btn.active-online {
    background: #0284c7 !important;
    color: #ffffff !important;
    border-color: #0284c7 !important;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3) !important;
}
.nls-mode-btn.active-offline {
    background: #d97706 !important;
    color: #ffffff !important;
    border-color: #d97706 !important;
    box-shadow: 0 4px 14px rgba(217, 119, 6, 0.3) !important;
}
html.dark .nls-mode-btn {
    background: #1e293b;
    border-color: #334155;
    color: #cbd5e1;
}
html.dark .nls-mode-btn:hover {
    background: #334155;
    color: #ffffff;
}
html.dark .nls-mode-btn.active-all {
    background: #38bdf8 !important;
    color: #0f172a !important;
    border-color: #38bdf8 !important;
}
html.dark .nls-mode-btn.active-online {
    background: #0ea5e9 !important;
    color: #ffffff !important;
    border-color: #0ea5e9 !important;
}
html.dark .nls-mode-btn.active-offline {
    background: #f59e0b !important;
    color: #0f172a !important;
    border-color: #f59e0b !important;
}

/* Elegant Dropdown Console Styles */
.nls-dropdown-trigger {
    cursor: pointer;
    user-select: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.nls-dropdown-trigger:hover {
    transform: translateY(-1px);
}
.nls-dropdown-menu {
    box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.22), 0 0 0 1px rgba(0, 0, 0, 0.05);
}
html.dark .nls-dropdown-menu {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.nls-custom-scrollbar::-webkit-scrollbar {
    width: 5px;
}
.nls-custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.nls-custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 9999px;
}
html.dark .nls-custom-scrollbar::-webkit-scrollbar-thumb {
    background: #475569;
}

/* Pills (Jenjang & Mata Pelajaran) */
.nls-pill-btn {
    padding: 7px 16px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 700;
    border: 1.5px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
    flex-shrink: 0;
}
.nls-pill-btn:hover {
    background: #f0f9ff;
    color: #0284c7;
    border-color: #0284c7;
    transform: translateY(-1px);
}
.nls-pill-btn.active {
    background: #004B70 !important;
    color: #ffffff !important;
    border-color: #004B70 !important;
    font-weight: 900 !important;
    box-shadow: 0 4px 12px rgba(0, 75, 112, 0.28) !important;
}
.nls-pill-btn.active-subject {
    background: #0284c7 !important;
    color: #ffffff !important;
    border-color: #0284c7 !important;
    font-weight: 900 !important;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.28) !important;
}
html.dark .nls-pill-btn {
    background: #1e293b;
    border-color: #334155;
    color: #cbd5e1;
}
html.dark .nls-pill-btn:hover {
    background: #334155;
    color: #38bdf8;
    border-color: #38bdf8;
}
html.dark .nls-pill-btn.active {
    background: #38bdf8 !important;
    color: #0f172a !important;
    border-color: #38bdf8 !important;
}
html.dark .nls-pill-btn.active-subject {
    background: #38bdf8 !important;
    color: #0f172a !important;
    border-color: #38bdf8 !important;
}

/* ==========================================================================
   4. TUTOR CARDS GRID & CARDS
   ========================================================================== */
.nls-tutors-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1.5rem;
}
@media (min-width: 768px) {
    .nls-tutors-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
    .nls-tutors-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.75rem; }
}

.nls-tutor-card {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 28px;
    box-shadow: 0 8px 24px -4px rgba(0, 46, 71, 0.08);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    position: relative;
}
.nls-tutor-card:hover {
    border-color: #38bdf8;
    transform: translateY(-6px);
    box-shadow: 0 24px 45px -12px rgba(0, 75, 112, 0.22);
}
html.dark .nls-tutor-card {
    background: #111a33;
    border-color: #1e293b;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}
html.dark .nls-tutor-card:hover {
    border-color: #0284c7;
    box-shadow: 0 20px 45px -10px rgba(2, 132, 199, 0.25);
}

.nls-tutor-avatar {
    width: 76px;
    height: 76px;
    border-radius: 20px;
    object-fit: cover;
    border: 2px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}
html.dark .nls-tutor-avatar {
    border-color: #334155;
}

/* Verified checkmark badge */
.nls-verified-badge {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 22px;
    height: 22px;
    background: #10b981;
    border: 2.5px solid #ffffff;
    border-radius: 9999px;
    color: #ffffff;
    font-size: 11px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
}
html.dark .nls-verified-badge {
    border-color: #111a33;
}

/* Rating badge */
.nls-rating-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    color: #b45309;
    font-size: 11.5px;
    font-weight: 900;
}
html.dark .nls-rating-tag {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.3);
    color: #fbbf24;
}

/* Learning mode tags */
.nls-mode-tag-online {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: #e0f2fe;
    border: 1px solid #bae6fd;
    border-radius: 10px;
    color: #0369a1;
    font-size: 11px;
    font-weight: 800;
}
.nls-mode-tag-offline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 10px;
    color: #92400e;
    font-size: 11px;
    font-weight: 800;
}
html.dark .nls-mode-tag-online {
    background: rgba(2, 132, 199, 0.15);
    border-color: rgba(2, 132, 199, 0.3);
    color: #38bdf8;
}
html.dark .nls-mode-tag-offline {
    background: rgba(217, 119, 6, 0.15);
    border-color: rgba(217, 119, 6, 0.3);
    color: #fbbf24;
}

/* Highlight badge */
.nls-highlight-box {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 10px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    line-height: 1.45;
}
html.dark .nls-highlight-box {
    background: #0a0f1d;
    border-color: #1e293b;
    color: #cbd5e1;
}

/* Pricing block */
.nls-card-price {
    font-size: 1.35rem;
    font-weight: 900;
    color: #059669;
    letter-spacing: -0.02em;
}
html.dark .nls-card-price {
    color: #34d399;
}

/* Primary CTA Button (Pesan Guru Ini) */
.nls-btn-book {
    width: 100%;
    padding: 14px 20px;
    border-radius: 18px;
    background: linear-gradient(135deg, #004B70 0%, #0284c7 100%);
    color: #ffffff !important;
    font-size: 14px;
    font-weight: 900;
    border: none;
    box-shadow: 0 6px 18px rgba(0, 75, 112, 0.28);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.nls-btn-book:hover {
    background: linear-gradient(135deg, #003652 0%, #0369a1 100%);
    transform: scale(1.02);
    box-shadow: 0 10px 24px rgba(2, 132, 199, 0.35);
}
.nls-btn-book:active {
    transform: scale(0.98);
}

/* Secondary Button (Profil Lengkap) */
.nls-btn-profile {
    width: 100%;
    padding: 10px 16px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    color: #334155;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.nls-btn-profile:hover {
    background: #e2e8f0;
    color: #0f172a;
    border-color: #94a3b8;
}
html.dark .nls-btn-profile {
    background: #1e293b;
    border-color: #334155;
    color: #cbd5e1;
}
html.dark .nls-btn-profile:hover {
    background: #334155;
    color: #ffffff;
}

/* ==========================================================================
   5. BOOKING MODAL & DRAWER STYLES
   ========================================================================== */
.nls-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    overflow-y: auto;
}

.nls-modal-card {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 32px;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.35);
    width: 100%;
    max-width: 760px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    margin: auto;
}
html.dark .nls-modal-card {
    background: #0f182e;
    border-color: #1e293b;
}

.nls-form-label {
    display: block;
    font-size: 12px;
    font-weight: 800;
    color: #334155;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
html.dark .nls-form-label {
    color: #cbd5e1;
}

.nls-form-control {
    width: 100%;
    padding: 12px 16px;
    border-radius: 14px;
    background: #f8fafc;
    border: 2px solid #cbd5e1;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    box-sizing: border-box;
    transition: all 0.2s ease;
}
.nls-form-control:focus {
    background: #ffffff;
    border-color: #0284c7;
    outline: none;
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.15);
}
html.dark .nls-form-control {
    background: #0a0f1d;
    border-color: #334155;
    color: #ffffff;
}
html.dark .nls-form-control:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.15);
}

/* Package select cards in modal */
.nls-pkg-card {
    border: 2px solid #cbd5e1;
    border-radius: 18px;
    padding: 14px 16px;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.nls-pkg-card:hover {
    border-color: #38bdf8;
    background: #f0f9ff;
}
.nls-pkg-card.active {
    border: 2.5px solid #0284c7 !important;
    background: #f0f9ff !important;
    box-shadow: 0 6px 18px rgba(2, 132, 199, 0.18) !important;
}
html.dark .nls-pkg-card {
    background: #1e293b;
    border-color: #334155;
}
html.dark .nls-pkg-card.active {
    background: rgba(2, 132, 199, 0.15) !important;
    border-color: #38bdf8 !important;
}

/* ==========================================================================
   6. PAGINATION CONTROLS
   ========================================================================== */
.nls-pagination-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1.5px solid #e2e8f0;
}
@media (min-width: 640px) {
    .nls-pagination-wrap {
        flex-direction: row;
    }
}
html.dark .nls-pagination-wrap {
    border-color: #1e293b;
}

.nls-pagination-info {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
}
html.dark .nls-pagination-info {
    color: #94a3b8;
}

.nls-pagination-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.nls-page-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 800;
    border: 1.5px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}
.nls-page-btn:hover:not(:disabled) {
    background: #f0f9ff;
    color: #0284c7;
    border-color: #0284c7;
    transform: translateY(-1px);
}
.nls-page-btn.active {
    background: #004B70 !important;
    color: #ffffff !important;
    border-color: #004B70 !important;
    box-shadow: 0 4px 12px rgba(0, 75, 112, 0.28) !important;
}
.nls-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f1f5f9;
    color: #94a3b8;
    border-color: #e2e8f0;
}

html.dark .nls-page-btn {
    background: #1e293b;
    border-color: #334155;
    color: #cbd5e1;
}
html.dark .nls-page-btn:hover:not(:disabled) {
    background: #334155;
    color: #38bdf8;
    border-color: #38bdf8;
}
html.dark .nls-page-btn.active {
    background: #38bdf8 !important;
    color: #0f172a !important;
    border-color: #38bdf8 !important;
}
html.dark .nls-page-btn:disabled {
    background: #0f172a;
    border-color: #1e293b;
    color: #475569;
}


/* Custom Scrollbar for Modals */
.nls-custom-scroll::-webkit-scrollbar { width: 6px; }
.nls-custom-scroll::-webkit-scrollbar-track { background: transparent; }
.nls-custom-scroll::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.4); border-radius: 9999px; }
.nls-custom-scroll::-webkit-scrollbar-thumb:hover { background: rgba(100, 116, 139, 0.7); }
html.dark .nls-custom-scroll::-webkit-scrollbar-thumb { background: rgba(51, 65, 85, 0.6); }
html.dark .nls-custom-scroll::-webkit-scrollbar-thumb:hover { background: rgba(100, 116, 139, 0.8); }

/* ==========================================================================
   BULLETPROOF MODAL AVATAR CONSTRAINTS (Never Explode)
   ========================================================================== */
.nls-modal-avatar,
img.nls-modal-avatar {
    width: 56px !important;
    height: 56px !important;
    min-width: 56px !important;
    min-height: 56px !important;
    max-width: 56px !important;
    max-height: 56px !important;
    border-radius: 16px !important;
    object-fit: cover !important;
    flex-shrink: 0 !important;
    display: block !important;
}

.nls-profile-modal-avatar,
img.nls-profile-modal-avatar {
    width: 72px !important;
    height: 72px !important;
    min-width: 72px !important;
    min-height: 72px !important;
    max-width: 72px !important;
    max-height: 72px !important;
    border-radius: 20px !important;
    object-fit: cover !important;
    flex-shrink: 0 !important;
    display: block !important;
}

/* Global Safety: Any img inside any modal container MUST respect container bounds */
[x-show*="Modal"] .relative.shrink-0 img,
[x-show*="Modal"] .p-4 img,
[x-show*="Modal"] .p-5 img,
[x-show*="Modal"] .p-6 img {
    max-width: 80px !important;
    max-height: 80px !important;
    object-fit: cover !important;
}
