/* Student PWA Mobile Design System */
:root {
    --pwa-primary: hsl(243, 75%, 59%);
    --pwa-primary-light: hsl(243, 75%, 70%);
    --pwa-secondary: hsl(262, 80%, 50%);
    --pwa-bg: hsl(210, 40%, 98%);
    --pwa-card-bg: rgba(255, 255, 255, 0.85);
    --pwa-text-main: hsl(210, 20%, 15%);
    --pwa-text-muted: hsl(210, 10%, 45%);
    --pwa-glass: rgba(255, 255, 255, 0.7);
    --pwa-blur: 12px;
    --pwa-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    --pwa-nav-height: 70px;
    --pwa-header-height: 60px;
}

/* =====================================================
   PRELOADER
   ===================================================== */
#pwa-preloader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(var(--pwa-blur));
    -webkit-backdrop-filter: blur(var(--pwa-blur));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

#pwa-preloader.pwa-preloader-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* --- Spinner Ring --- */
.pwa-spinner {
    width: 64px;
    height: 64px;
    position: relative;
    margin-bottom: 24px;
}

.pwa-spinner::before,
.pwa-spinner::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid transparent;
}

.pwa-spinner::before {
    border-top-color: var(--pwa-primary);
    border-right-color: var(--pwa-primary);
    animation: pwa-spin 0.9s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.pwa-spinner::after {
    border-bottom-color: var(--pwa-secondary);
    border-left-color: var(--pwa-secondary);
    animation: pwa-spin 0.9s cubic-bezier(0.4, 0, 0.2, 1) 0.15s infinite reverse;
    width: 48px;
    height: 48px;
    top: 8px;
    left: 8px;
}

/* --- Logo Dot in center --- */
.pwa-spinner-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    background: var(--pwa-primary);
    border-radius: 50%;
    animation: pwa-dot-pulse 1.2s ease-in-out infinite;
}

/* --- Text --- */
.pwa-preloader-label {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--pwa-text-main);
    animation: pwa-text-fade 1.4s ease-in-out infinite alternate;
}

@keyframes pwa-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes pwa-dot-pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1);   opacity: 1; }
    50%       { transform: translate(-50%, -50%) scale(0.6); opacity: 0.5; }
}

@keyframes pwa-text-fade {
    from { opacity: 0.5; }
    to   { opacity: 1; }
}


/* =====================================================
   PAGE TRANSITION OVERLAY (fade-out on link click)
   ===================================================== */
#pwa-page-overlay {
    position: fixed;
    inset: 0;
    z-index: 99998;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(var(--pwa-blur));
    -webkit-backdrop-filter: blur(var(--pwa-blur));
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

#pwa-page-overlay.pwa-overlay-active {
    opacity: 1;
    pointer-events: all;
}


/* =====================================================
   PAGE FADE-IN (when DOM is ready content rises in)
   ===================================================== */
@keyframes pwa-fade-in-up {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pwa-page-content {
    animation: pwa-fade-in-up 0.25s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}


/* =====================================================
   BODY & GENERAL
   ===================================================== */
body.pwa-mode {
    background-color: var(--pwa-bg) !important;
    font-family: 'Inter', sans-serif !important;
    padding-bottom: var(--pwa-nav-height) !important;
    padding-top: var(--pwa-header-height) !important;
}

/* Bottom Navigation Bar */
.pwa-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--pwa-nav-height);
    background: var(--pwa-glass);
    backdrop-filter: blur(var(--pwa-blur));
    -webkit-backdrop-filter: blur(var(--pwa-blur));
    display: none; /* Shown via media query */
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 10000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

.pwa-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none !important;
    color: var(--pwa-text-muted);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 11px;
    font-weight: 500;
}

.pwa-nav-item i {
    font-size: 20px;
    margin-bottom: 4px;
}

.pwa-nav-item.active {
    color: var(--pwa-primary);
    transform: translateY(-2px);
}

/* Premium Card Styles */
.my-course-1-full-body-card {
    border: none !important;
    border-radius: 20px !important;
    background: var(--pwa-card-bg) !important;
    box-shadow: var(--pwa-shadow) !important;
    overflow: hidden;
    margin-bottom: 24px !important;
    transition: transform 0.3s ease;
}

.my-course-1-img img {
    border-radius: 0 !important;
    object-fit: cover;
    height: 180px;
}

.my-course-1-text {
    padding: 20px !important;
}

.my-course-1-text h3 {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: var(--pwa-text-main);
    line-height: 1.4 !important;
}

/* Progress Bar Redesign */
.skill-bar-container {
    background: #eef2f7 !important;
    height: 8px !important;
    border-radius: 10px !important;
}

.skill-bar {
    background: linear-gradient(90deg, var(--pwa-primary), var(--pwa-secondary)) !important;
    border-radius: 10px !important;
}

/* Mobile Overrides */
@media (max-width: 768px) {
    .pwa-bottom-nav {
        display: flex;
    }
    
    /* Hide desktop headers and sidebars in PWA mode */
    .wish-list-body .col-lg-3, 
    .wish-list-body .breadcrumb,
    footer,
    header {
        display: none !important;
    }

    .wish-list-body {
        padding-top: 24px !important;
    }

    .container {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
    
    .my-course-1-full-body h1 {
        font-size: 24px !important;
        font-weight: 800 !important;
        margin-bottom: 24px !important;
    }
}

/* Floating Action Button */
.pwa-fab {
    position: fixed;
    right: 20px;
    bottom: 90px;
    width: 56px;
    height: 56px;
    background: var(--pwa-primary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
    z-index: 999;
}


/* =====================================================
   PWA TOP HEADER BAR
   ===================================================== */
.pwa-top-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--pwa-header-height);
    background: var(--pwa-glass);
    backdrop-filter: blur(var(--pwa-blur));
    -webkit-backdrop-filter: blur(var(--pwa-blur));
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 10001;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
}

.pwa-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 16px;
}

/* --- Burger Button --- */
.pwa-burger-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    padding: 6px;
    cursor: pointer;
    border-radius: 10px;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.pwa-burger-btn:hover,
.pwa-burger-btn:active {
    background: rgba(79, 70, 229, 0.08);
}

.pwa-burger-line {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--pwa-text-main);
    border-radius: 4px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

/* --- Center Logo --- */
.pwa-header-logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    height: 100%;
    text-decoration: none;
}

.pwa-logo-img {
    max-height: 36px;
    max-width: 140px;
    width: auto;
    object-fit: contain;
}

/* --- Right: Avatar / Login --- */
.pwa-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.pwa-avatar-btn {
    display: block;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--pwa-primary);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    flex-shrink: 0;
}

.pwa-avatar-btn:hover,
.pwa-avatar-btn:active {
    transform: scale(1.05);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.25);
}

.pwa-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.pwa-login-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--pwa-primary);
    color: #fff;
    font-size: 16px;
    text-decoration: none;
    transition: transform 0.25s ease;
}

.pwa-login-pill:hover { transform: scale(1.08); }


/* =====================================================
   PWA DRAWER SIDEBAR
   ===================================================== */

/* Dark overlay behind the drawer */
.pwa-drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 10002;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.pwa-drawer-overlay--visible {
    opacity: 1;
    pointer-events: all;
}

/* The Drawer Panel */
.pwa-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: min(320px, 85vw);
    height: 100dvh;
    height: 100vh; /* fallback */
    background: #ffffff;
    z-index: 10003;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.15);
}

.pwa-drawer--open {
    transform: translateX(0);
}

/* Drawer Header Section */
.pwa-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 16px 20px 20px;
    background: linear-gradient(135deg, hsl(243, 75%, 59%), hsl(262, 80%, 50%));
    flex-shrink: 0;
}

.pwa-drawer-user {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.pwa-drawer-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.7);
    flex-shrink: 0;
}

.pwa-drawer-user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.pwa-drawer-name {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pwa-drawer-email {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.75);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pwa-drawer-logo {
    flex: 1;
}

.pwa-drawer-logo .pwa-logo-img {
    max-height: 32px;
    filter: brightness(0) invert(1);
}

.pwa-drawer-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    margin-left: 8px;
    transition: background 0.2s ease;
}

.pwa-drawer-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Drawer Navigation List */
.pwa-drawer-nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px 0;
}

.pwa-drawer-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pwa-drawer-item {
    margin: 2px 12px;
    border-radius: 12px;
    overflow: hidden;
}

.pwa-drawer-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 16px;
    text-decoration: none !important;
    color: var(--pwa-text-main);
    font-size: 15px;
    font-weight: 500;
    border-radius: 12px;
    transition: background 0.2s ease, color 0.2s ease;
}

.pwa-drawer-link:hover {
    background: rgba(79, 70, 229, 0.07);
    color: var(--pwa-primary);
}

.pwa-drawer-item--active .pwa-drawer-link {
    background: rgba(79, 70, 229, 0.1);
    color: var(--pwa-primary);
    font-weight: 600;
}

.pwa-drawer-icon {
    width: 36px;
    height: 36px;
    background: rgba(79, 70, 229, 0.08);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--pwa-primary);
    flex-shrink: 0;
    transition: background 0.2s;
}

.pwa-drawer-item--active .pwa-drawer-icon,
.pwa-drawer-link:hover .pwa-drawer-icon {
    background: var(--pwa-primary);
    color: #ffffff;
}

/* Divider */
.pwa-drawer-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.07);
    margin: 10px 20px;
    border-radius: 2px;
}

/* Logout row */
.pwa-drawer-item--logout .pwa-drawer-link {
    color: hsl(0, 70%, 50%);
}

.pwa-drawer-item--logout .pwa-drawer-icon {
    background: rgba(220, 50, 50, 0.08);
    color: hsl(0, 70%, 50%);
}

.pwa-drawer-item--logout .pwa-drawer-link:hover {
    background: rgba(220, 50, 50, 0.07);
    color: hsl(0, 70%, 50%);
}

.pwa-drawer-item--logout .pwa-drawer-link:hover .pwa-drawer-icon {
    background: hsl(0, 70%, 50%);
    color: #ffffff;
}

/* =====================================================
   ADVANCED PROFILE PAGE STYLES
   ===================================================== */

/* Profile Hero Section */
.pwa-profile-hero {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(180deg, rgba(79, 70, 229, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
    margin-bottom: 20px;
}

.pwa-avatar-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 15px;
}

.pwa-avatar-large {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.pwa-avatar-edit-badge {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 36px;
    height: 36px;
    background: var(--pwa-primary);
    border: 3px solid #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
    z-index: 5;
}

.pwa-avatar-edit-badge:active {
    transform: scale(0.9);
}

.pwa-hero-name {
    font-size: 22px;
    font-weight: 800;
    color: var(--pwa-text-main);
    margin-bottom: 4px;
}

.pwa-hero-email {
    font-size: 14px;
    color: var(--pwa-text-muted);
}

/* Settings Groups (Card Style) */
.pwa-settings-group {
    background: #fff;
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--pwa-shadow);
}

.pwa-settings-group-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--pwa-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pwa-settings-group-title i {
    opacity: 0.8;
}

/* Premium Inputs */
.pwa-input-item {
    margin-bottom: 18px;
}

.pwa-input-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--pwa-text-muted);
    margin-bottom: 8px;
    margin-left: 4px;
}

.pwa-input-control {
    width: 100%;
    border: 1px solid #eef2f7;
    background: #f8fafc;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 15px;
    color: var(--pwa-text-main);
    transition: all 0.2s ease;
}

.pwa-input-control:focus {
    outline: none;
    border-color: var(--pwa-primary-light);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.05);
}

.pwa-input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.pwa-input-with-icon i {
    position: absolute;
    left: 16px;
    color: var(--pwa-text-muted);
    font-size: 16px;
}

.pwa-input-with-icon .pwa-input-control {
    padding-left: 44px;
}

/* Save Button */
.pwa-save-btn-container {
    padding: 20px 0 40px;
    text-align: center;
}

.pwa-save-btn {
    width: 100%;
    max-width: 280px;
    background: linear-gradient(135deg, var(--pwa-primary), var(--pwa-secondary));
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.25);
    transition: all 0.3s ease;
}

.pwa-save-btn:active {
    transform: scale(0.96);
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.2);
}

/* Mobile Overrides */
@media (max-width: 768px) {
    .profile-ful-body.common-card {
        border: none !important;
        background: transparent !important;
        box-shadow: none !important;
        padding: 0 !important;
    }
    
    .profile-parrent {
        display: none !important; /* Replaced by new hero */
    }
    
    .profile-input-section {
        padding: 0 !important;
    }
}


/* =====================================================
   PWA PROFILE DASHBOARD (9-GRID)
   ===================================================== */

.pwa-dashboard-container {
    padding-top: 15px;
    padding-bottom: 30px;
}

.pwa-dashboard-header {
    margin-bottom: 25px;
    padding: 0 20px;
}

.pwa-dashboard-user {
    background: #fff;
    padding: 24px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--pwa-shadow);
}

.pwa-dashboard-avatar {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--pwa-primary-light);
    flex-shrink: 0;
}

.pwa-dashboard-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pwa-dashboard-info h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--pwa-text-main);
    margin: 0;
}

.pwa-dashboard-info p {
    font-size: 13px;
    color: var(--pwa-text-muted);
    margin: 2px 0 0;
}

/* Grid Styles */
.pwa-grid-item {
    background: #fff;
    border-radius: 20px;
    padding: 20px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 115px;
}

.pwa-grid-item:active {
    transform: scale(0.92);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.pwa-grid-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.pwa-grid-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--pwa-text-main);
    text-align: center;
}

/* Icon Colors */
.icon-1 { background: rgba(79, 70, 229, 0.1); color: var(--pwa-primary); }
.icon-2 { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
.icon-3 { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.icon-4 { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.icon-5 { background: rgba(99, 102, 241, 0.1); color: #6366f1; }
.icon-6 { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }
.icon-7 { background: rgba(6, 182, 212, 0.1); color: #06b6d4; }
.icon-8 { background: rgba(107, 114, 128, 0.1); color: #6b7280; }
.icon-9 { background: rgba(220, 38, 38, 0.1); color: #dc2626; }

.logout-grid-item .pwa-grid-label { color: #dc2626; }

/* Desktop Override */
@media (min-width: 769px) {
    .pwa-dashboard-container {
        display: none !important;
    }
}


/* =====================================================
   PWA COURSES PAGE STYLES
   ===================================================== */

/* Fixed Header for Courses */
.pwa-courses-header {
    background: #fff;
    padding: 10px 0 0;
    position: sticky;
    top: var(--pwa-header-height);
    z-index: 999;
}

.pwa-search-container {
    padding: 0 16px 12px;
}

.pwa-search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.pwa-search-input-wrap i {
    position: absolute;
    left: 16px;
    color: var(--pwa-text-muted);
}

.pwa-search-input {
    width: 100%;
    background: #f1f5f9;
    border: none;
    padding: 12px 16px 12px 42px;
    border-radius: 14px;
    font-size: 15px;
    color: var(--pwa-text-main);
}

/* Horizontal Categories */
.pwa-category-scroll {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding: 0 16px 15px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.pwa-category-scroll::-webkit-scrollbar {
    display: none;
}

.pwa-cat-chip {
    white-space: nowrap;
    padding: 8px 18px;
    background: #f1f5f9;
    color: var(--pwa-text-muted);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.pwa-cat-chip.active {
    background: var(--pwa-primary);
    color: #fff;
}

/* Filter Summary Bar */
.pwa-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f8fafc;
    border-top: 1px solid #eff2f6;
    border-bottom: 1px solid #eff2f6;
}

.pwa-filter-count {
    font-size: 13px;
    font-weight: 700;
    color: var(--pwa-text-main);
}

.pwa-filter-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--pwa-primary);
    color: #fff;
    border: none;
    padding: 6px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
}

/* Course Grid Redesign (Mobile) */
.pwa-course-grid {
    padding: 16px;
}

.pwa-course-card {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    border: 1px solid #f1f5f9;
}

.pwa-card-img {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
}

.pwa-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pwa-card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
}

.pwa-card-info {
    padding: 15px;
}

.pwa-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--pwa-text-main);
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pwa-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--pwa-text-muted);
    margin-bottom: 12px;
}

.pwa-card-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pwa-card-price {
    font-size: 16px;
    font-weight: 800;
    color: var(--pwa-primary);
}

.pwa-card-price del {
    font-size: 12px;
    color: var(--pwa-text-muted);
    margin-right: 5px;
}

/* Filter Drawer Overlay */
.pwa-filter-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 90vh;
    background: #fff;
    z-index: 100005;
    border-radius: 24px 24px 0 0;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.pwa-filter-drawer.active {
    transform: translateY(0);
}

.pwa-filter-head {
    padding: 20px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pwa-filter-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.pwa-filter-section {
    margin-bottom: 25px;
}

.pwa-filter-section h4 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 15px;
}

.pwa-filter-option {
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid #f8fafc;
    font-size: 14px;
    color: var(--pwa-text-main);
    text-decoration: none !important;
}

.pwa-filter-footer {
    padding: 20px;
    border-top: 1px solid #f1f5f9;
    background: #fff;
}

.pwa-filter-apply {
    width: 100%;
    background: var(--pwa-primary);
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
}


/* =====================================================
   PWA COURSE DETAILS PAGE STYLES
   ===================================================== */

/* Immersive Hero Section */
.pwa-course-hero {
    position: relative;
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.pwa-course-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pwa-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 50%);
}

.pwa-hero-top-btns {
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    display: flex;
    justify-content: space-between;
    z-index: 10;
}

.pwa-circle-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
}

.pwa-course-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: var(--pwa-primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 0 0 10px rgba(var(--pwa-primary-rgb), 0.2);
    animation: pwa-pulse 2s infinite;
}

@keyframes pwa-pulse {
    0% { box-shadow: 0 0 0 0 rgba(var(--pwa-primary-rgb), 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(var(--pwa-primary-rgb), 0); }
    100% { box-shadow: 0 0 0 0 rgba(var(--pwa-primary-rgb), 0); }
}

/* Course Title Area */
.pwa-course-meta-area {
    padding: 20px 16px;
    background: #fff;
}

.pwa-course-meta-area h1 {
    font-size: 20px;
    font-weight: 800;
    color: var(--pwa-text-main);
    margin-bottom: 12px;
    line-height: 1.3;
}

.pwa-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 20px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 16px;
}

.pwa-stat-item {
    text-align: center;
}

.pwa-stat-item i, .pwa-stat-item svg {
    font-size: 16px;
    color: var(--pwa-primary);
    margin-bottom: 6px;
}

.pwa-stat-item span {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--pwa-text-main);
}

.pwa-stat-item label {
    display: block;
    font-size: 10px;
    color: var(--pwa-text-muted);
}

/* Tab Navigation (Course Page) */
.pwa-course-tabs {
    border: none;
    margin: 10px 0;
    padding: 0 16px;
    gap: 15px;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
}

.pwa-course-tabs .nav-link {
    white-space: nowrap;
    border: none !important;
    padding: 10px 0;
    font-weight: 700;
    font-size: 14px;
    color: var(--pwa-text-muted);
    position: relative;
    background: transparent !important;
}

.pwa-course-tabs .nav-link.active {
    color: var(--pwa-primary) !important;
}

.pwa-course-tabs .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    width: 60%;
    height: 3px;
    background: var(--pwa-primary);
    border-radius: 3px;
}

.pwa-tab-content {
    line-height: 1.6;
    color: #475569;
    font-size: 15px;
}

/* Sticky Action Bar */
.pwa-action-bar {
    position: fixed;
    bottom: var(--pwa-bottom-nav-height);
    left: 0;
    width: 100%;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    padding: 12px 16px;
    gap: 12px;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.05);
    z-index: 1000;
    border-top: 1px solid #f1f5f9;
}

.pwa-action-price {
    flex: 1;
}

.pwa-action-price h2 {
    font-size: 18px;
    font-weight: 800;
    margin: 0;
    color: var(--pwa-text-main);
}

.pwa-action-price del {
    font-size: 12px;
    color: var(--pwa-text-muted);
}

.pwa-action-btn {
    flex: 2;
    background: var(--pwa-primary);
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    text-align: center;
    text-decoration: none !important;
}

.pwa-wish-icon-btn {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #f1f5f9;
    color: var(--pwa-text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.pwa-wish-icon-btn.active {
    color: #f43f5e;
}


/* =====================================================
   PWA INSTRUCTOR PROFILE STYLES
   ===================================================== */

.pwa-instructor-hero {
    padding: 40px 16px 30px;
    background: linear-gradient(185deg, #f8fafc 0%, #fff 100%);
    text-align: center;
    border-bottom: 1px solid #f1f5f9;
}

.pwa-instructor-avatar-wrap {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.pwa-instructor-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.pwa-instructor-hero h2 {
    font-size: 22px;
    font-weight: 800;
    color: var(--pwa-text-main);
    margin: 0 0 5px;
}

.pwa-instructor-hero p {
    font-size: 14px;
    color: var(--pwa-text-muted);
    margin-bottom: 20px;
}

.pwa-social-row {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.pwa-social-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    color: var(--pwa-text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    text-decoration: none !important;
}

/* Badge row on mobile */
.pwa-badge-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.pwa-badge-row img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

/* Professional Skills chips */
.pwa-skill-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.pwa-skill-chip {
    padding: 6px 14px;
    background: #f1f5f9;
    color: var(--pwa-text-main);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* Instructor Sticky Footer */
.pwa-instructor-footer {
    position: fixed;
    bottom: var(--pwa-bottom-nav-height);
    left: 0;
    width: 100%;
    background: #fff;
    padding: 12px 16px;
    display: flex;
    gap: 12px;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.05);
    z-index: 1000;
    border-top: 1px solid #f1f5f9;
}

.pwa-btn-outline {
    flex: 1;
    background: #fff;
    color: var(--pwa-text-main);
    border: 1.5px solid #e2e8f0;
    padding: 12px;
    border-radius: 12px;
    font-weight: 700;
    text-align: center;
    text-decoration: none !important;
}

.pwa-btn-fill {
    flex: 1;
    background: var(--pwa-primary);
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 12px;
    font-weight: 700;
    text-align: center;
    text-decoration: none !important;
}


/* =====================================================
   PWA MESSAGING STYLES (INBOX & CHAT)
   ===================================================== */

/* State Toggling */
.pwa-msg-state-hidden {
    display: none !important;
}

/* Inbox Thread Item */
.pwa-msg-thread {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
    background: #fff;
    text-decoration: none !important;
    transition: background 0.2s;
}

.pwa-msg-thread:active {
    background: #f8fafc;
}

.pwa-msg-thread.active {
    background: #f0f9ff;
    border-left: 4px solid var(--pwa-primary);
}

.pwa-msg-avatar-wrap {
    position: relative;
    margin-right: 14px;
}

.pwa-msg-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
}

.pwa-msg-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 10px;
    border: 2px solid #fff;
}

.pwa-msg-info {
    flex: 1;
    min-width: 0;
}

.pwa-msg-info h4 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 4px;
    color: var(--pwa-text-main);
    display: flex;
    justify-content: space-between;
}

.pwa-msg-info h4 span.time {
    font-size: 11px;
    font-weight: 400;
    color: var(--pwa-text-muted);
}

.pwa-msg-preview {
    font-size: 13px;
    color: var(--pwa-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

/* Chat Bubbles */
.pwa-chat-container {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: #f8fafc;
    min-height: calc(100vh - 160px);
}

.pwa-bubble {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 15px;
    line-height: 1.5;
    position: relative;
}

.pwa-bubble-left {
    align-self: flex-start;
    background: #fff;
    color: var(--pwa-text-main);
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.pwa-bubble-right {
    align-self: flex-end;
    background: var(--pwa-primary);
    color: #fff;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 10px rgba(var(--pwa-primary-rgb), 0.2);
}

.pwa-bubble-time {
    font-size: 10px;
    margin-top: 5px;
    display: block;
    opacity: 0.7;
}

/* Sticky Input Bar */
.pwa-msg-input-bar {
    position: fixed;
    bottom: var(--pwa-bottom-nav-height);
    left: 0;
    width: 100%;
    background: #fff;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-top: 1px solid #f1f5f9;
    z-index: 1000;
}

.pwa-msg-input-bar textarea {
    flex: 1;
    height: 44px;
    border-radius: 22px;
    border: 1px solid #e2e8f0;
    padding: 10px 18px;
    font-size: 15px;
    resize: none;
    line-height: 22px;
}

.pwa-msg-send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--pwa-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    font-size: 18px;
}

/* Search Interface (New Chat) */
.pwa-msg-search-header {
    padding: 16px;
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
}

.pwa-search-pill {
    background: #f1f5f9;
    border-radius: 12px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* =====================================================
   PWA HOME PAGE STYLES
   ===================================================== */

/* Home Hero Section */
.pwa-home-hero {
    background: linear-gradient(135deg, var(--pwa-primary) 0%, #4f46e5 100%);
    padding: 30px 20px 40px;
    border-bottom-left-radius: 35px;
    border-bottom-right-radius: 35px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.pwa-home-hero::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.pwa-home-hero h1 {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
}

.pwa-home-hero p {
    font-size: 13px;
    color: rgba(255,255,255,0.8);
    margin-bottom: 25px;
}

.pwa-home-search-bar {
    background: #fff;
    border-radius: 50px;
    padding: 4px 6px;
    display: flex;
    align-items: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.pwa-home-search-bar i {
    width: 40px;
    color: var(--pwa-text-muted);
}

.pwa-home-search-bar input {
    flex: 1;
    border: none;
    font-size: 15px;
    padding: 10px 5px;
    outline: none;
    background: transparent;
}

.pwa-home-search-bar button {
    background: var(--pwa-primary);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Horizontal Scrollers */
.pwa-hor-scroller {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 5px 20px 20px;
    margin: 0 -20px;
    -webkit-overflow-scrolling: touch;
}

.pwa-hor-scroller::-webkit-scrollbar {
    display: none;
}

.pwa-scroller-item {
    scroll-snap-align: start;
    flex: 0 0 auto;
    width: 260px;
    margin-right: 15px;
}

/* Category Pills */
.pwa-cat-pills {
    display: flex;
    overflow-x: auto;
    padding: 10px 20px;
    margin: 10px -20px 20px;
    gap: 10px;
}

.pwa-cat-pills::-webkit-scrollbar {
    display: none;
}

.pwa-cat-pill {
    white-space: nowrap;
    background: #fff;
    border: 1px solid #f1f5f9;
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    color: var(--pwa-text-main);
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.pwa-cat-pill.active {
    background: var(--pwa-primary);
    color: #fff;
    border-color: var(--pwa-primary);
}

/* Section Titles */
.pwa-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5px 15px;
}

.pwa-section-header h3 {
    font-size: 18px;
    font-weight: 800;
    margin: 0;
}

.pwa-section-header a {
    font-size: 13px;
    color: var(--pwa-primary);
    text-decoration: none;
    font-weight: 700;
}

/* Compact Course Card */
.pwa-course-item-compact {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid #f1f5f9;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.pwa-course-thumb-compact {
    height: 140px;
    width: 100%;
    object-fit: cover;
}

.pwa-course-info-compact {
    padding: 12px;
}

.pwa-course-title-compact {
    font-size: 14px;
    font-weight: 800;
    color: var(--pwa-text-main);
    line-height: 1.4;
    height: 40px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 8px;
}

.pwa-course-meta-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pwa-course-price-compact {
    font-size: 15px;
    font-weight: 800;
    color: var(--pwa-primary);
}

.pwa-course-rating-compact {
    font-size: 12px;
    color: #f59e0b;
    font-weight: 700;
}

/* =====================================================
   PWA PROFILE PAGE - PROFESSIONAL REDESIGN
   ===================================================== */
.pwa-profile-container {
    background-color: var(--pwa-bg);
    min-height: 100vh;
}

.pwa-profile-cover {
    height: 150px;
    background: linear-gradient(135deg, var(--pwa-primary) 0%, var(--pwa-secondary) 100%);
    border-bottom-left-radius: 30px;
    border-bottom-right-radius: 30px;
}

.pwa-profile-hero-content {
    margin-top: -60px;
    text-align: center;
    position: relative;
    z-index: 5;
    padding-bottom: 25px;
}

.pwa-avatar-large-premium {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid #fff;
    margin: 0 auto;
}

.pwa-avatar-edit-badge {
    cursor: pointer;
    transition: all 0.2s ease;
}

.pwa-avatar-edit-badge:active {
    transform: scale(0.9);
}

.pwa-hero-info h2 {
    font-size: 20px;
    font-weight: 800;
    margin: 10px 0 2px;
    color: var(--pwa-text-main);
}

.pwa-hero-info p {
    font-size: 13px;
    color: var(--pwa-text-muted);
}

/* Stats Row */
.pwa-stats-row {
    display: flex;
    justify-content: space-around;
    padding: 0 20px;
    margin-bottom: 30px;
}

.pwa-stat-item {
    text-align: center;
    background: #fff;
    padding: 12px 20px;
    border-radius: 16px;
    flex: 1;
    margin: 0 6px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.pwa-stat-value {
    display: block;
    font-size: 18px;
    font-weight: 800;
    color: var(--pwa-primary);
}

.pwa-stat-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--pwa-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Tabs Nav */
.pwa-tabs-nav {
    display: flex;
    padding: 0 10px;
    margin-bottom: 20px;
}

.pwa-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--pwa-text-muted);
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.pwa-tab-btn.active {
    color: var(--pwa-primary);
    border-bottom-color: var(--pwa-primary);
}

/* Form Styles */
.pwa-tab-content {
    display: none;
}

.pwa-tab-content.active {
    display: block;
}

.pwa-input-with-icon {
    background: #f8fafc;
    border: 1px solid #eef2f7;
    transition: border-color 0.2s;
}

.pwa-input-with-icon:focus-within {
    border-color: var(--pwa-primary-light);
}

.shadow-pwa-primary {
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.2) !important;
}








