/* Learning Enhancements UI */

.text-purple {
    color: #6405C3 !important;
}

.bg-purple {
    background-color: #6405C3 !important;
}

.le-enhancement-strip {
    background: linear-gradient(135deg, #f8f4ff 0%, #fff 100%);
    border: 1px solid #e8dff5;
    border-radius: 12px;
}

.le-stat-card {
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    background: #fff;
    border: 1px solid #eee;
}

.le-stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #6405C3;
}

.le-stat-card .stat-label {
    font-size: 0.75rem;
    color: #666;
    text-transform: uppercase;
}

.le-badge {
    display: inline-block;
    background: linear-gradient(135deg, #6405C3, #9966FF);
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    margin: 2px;
}

.le-continue-item {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #eee;
    transition: background 0.2s;
}

.le-continue-item:hover {
    background: #f8f4ff;
}

.le-path-steps li {
    padding: 6px 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.le-path-steps li.done {
    color: #28a745;
}

.le-path-steps li.locked {
    opacity: 0.4;
}

/* .le-flashcard-due {
    background: linear-gradient(135deg, #6405C3, #9966FF);
    color: white;
} */

/* Container styling with a vibrant, modern gradient */
.le-flashcard-due {
    background: linear-gradient(135deg, #f5f6ff, #ede4ff);
    color: #7300ff;
    border: none !important;
    box-shadow: 0 4px 15px rgba(100, 5, 195, 0.15);
    transition: transform 0.2s ease;
}

/* Fixes for text readability on dark background */
.le-flashcard-due .card-tag {
    color: rgba(28, 28, 28, 0.7) !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Base button styling - permanent colors */
.le-flashcard-due .btn-srs {
    border: none;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
    transition: opacity 0.2s ease, transform 0.1s ease;
}

/* Permanent Color States */
.le-flashcard-due .btn-hard {
    background-color: #e74c3c;
    /* Vibrant Red */
}

.le-flashcard-due .btn-good {
    background-color: #f1c40f;
    /* Vibrant Yellow */
    color: #2c3e50;
    /* Dark text for readability on yellow */
}

.le-flashcard-due .btn-easy {
    background-color: #2ecc71;
    /* Vibrant Green */
}

/* Subtle hover effect just to show it's clickable */
.le-flashcard-due .btn-srs:hover {
    opacity: 0.9;
    transform: scale(1.03);
}

.le-flashcard-due .btn-srs:active {
    transform: scale(0.98);
}

#learningPathWidget,
.le-tutor-mode-select {
    font-size: 0.85rem;
}

/* Custom styling for the upgraded Learning Path */

/* Purple theme fallback */
.bg-purple-light {
    background-color: #eef2ff;
}

.text-purple {
    color: #667eea;
}

/* Timeline vertical track line */
.le-timeline-container::before {
    content: '';
    position: absolute;
    left: 20px;
    /* Aligns exactly behind the icons */
    top: 8px;
    bottom: 24px;
    width: 2px;
    background: #e2e8f0;
    z-index: 1;
}

/* Fix item layer ordering so icons stay above the line */
.le-step-item {
    z-index: 2;
}

/* Specific styling for states */
.le-step-item.locked .le-step-label {
    opacity: 0.6;
}

.le-step-item.active .le-step-label {
    position: relative;
}

/* Smooth CSS Animations */
.progress-animated {
    transition: width 1s ease-in-out;
}

/* Subtle pulse for current/active step */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.15);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.animate-pulse {
    animation: pulse 2s infinite ease-in-out;
}

/* Pop effect for completed items */
@keyframes pop {
    0% {
        transform: scale(0.8);
    }

    100% {
        transform: scale(1);
    }
}

.animate-pop {
    animation: pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Extra Button enhancements to match the premium layout */
.btn-premium-action {
    transition: all 0.2s ease-in-out;
}

.btn-premium-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35) !important;
    opacity: 0.95;
}

/* Subtle sparkle animation for the smart practice icon */
@keyframes gentle-sparkle {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }

    50% {
        transform: scale(1.15) rotate(10deg);
        opacity: 0.9;
    }
}

.animate-sparkle {
    animation: gentle-sparkle 3s infinite ease-in-out;
}

/* Extra Button enhancements to match the premium layout */
.btn-premium-action {
    transition: all 0.2s ease-in-out;
}

.btn-premium-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35) !important;
    opacity: 0.95;
}

/* Subtle sparkle animation for the smart practice icon */
@keyframes gentle-sparkle {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }

    50% {
        transform: scale(1.15) rotate(10deg);
        opacity: 0.9;
    }
}

.animate-sparkle {
    animation: gentle-sparkle 3s infinite ease-in-out;
}

.custom-retest-wrong-btn {
    background: #6405C3;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
}

.custom-retest-wrong-btn:hover {
    background: #4a0391;
    color: #fff;
}

/* ─── Class Leaderboard ─────────────────────────────────────────────── */
.le-lb-card {
    background: #fff !important;
    border: 1px solid rgba(100, 5, 195, 0.16) !important;
    border-radius: 12px !important;
    overflow: hidden;
    height: 450px;
}

.le-lb-header {
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #6405C3 0%, #9966FF 100%);
    color: #fff;
}

.le-lb-title {
    font-size: 1.05rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
}

.le-lb-title i {
    color: #FFD700;
}

.le-lb-subtitle {
    font-size: 0.78rem;
    opacity: 0.92;
    margin-top: 0.2rem;
    color: rgba(255, 255, 255, 0.92);
}

.le-lb-body {
    padding: 0;
}

.le-lb-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: #7a6b8f;
}

.le-lb-table-wrap {
    margin: 0;
}

.le-lb-table {
    width: 100%;
    border-collapse: collapse;
    /* table-layout: fixed; */
}

.le-lb-table thead th {
    background: #faf8ff;
    color: #7a6b8f;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid #eee8f8;
    vertical-align: middle;
}

/* Data Column Width Declarations (Maintained Exactly As Provided) */
.le-lb-th-rank {
    width: 64px;
    text-align: center;
}

.le-lb-th-student {
    width: auto;
    text-align: left;
}

.le-lb-th-xp {
    width: 100px;
    text-align: center;
}

.le-lb-th-acc {
    width: 160px;
    text-align: left;
}

/* Table Cell Base Rule Alignment Upgrades */
.le-lb-table tbody td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #f5f0fc;
    font-size: 0.88rem;
}

.le-lb-table tbody tr:last-child td {
    border-bottom: none;
}

.le-lb-table tbody tr:hover td {
    background: #faf8ff;
}

.le-lb-tr-gold td {
    background: rgba(255, 215, 0, 0.08) !important;
}

.le-lb-tr-silver td {
    background: rgba(192, 192, 192, 0.1) !important;
}

.le-lb-tr-bronze td {
    background: rgba(205, 127, 50, 0.08) !important;
}

.le-lb-tr-you td {
    background: rgba(100, 5, 195, 0.07) !important;
    box-shadow: inset 4px 0 0 #6405C3;
}

/* Explicit Body Alignments matching headers */
.le-lb-td-rank {
    text-align: center !important;
}

.le-lb-td-student {
    text-align: left !important;
}

.le-lb-td-xp {
    text-align: center !important;
}

.le-lb-td-acc {
    text-align: left !important;
}

.le-lb-medal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 0.9rem;
}

.le-lb-medal-gold {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #fff;
    box-shadow: 0 2px 8px rgba(255, 165, 0, 0.35);
}

.le-lb-medal-silver {
    background: linear-gradient(135deg, #E8E8E8, #A8A8A8);
    color: #fff;
}

.le-lb-medal-bronze {
    background: linear-gradient(135deg, #CD7F32, #A0522D);
    color: #fff;
}

.le-lb-rank-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f0ebf8;
    font-size: 0.85rem;
    font-weight: 700;
    color: #7a6b8f;
}

.le-lb-student-cell {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
    text-align: left;
}

.le-lb-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6405C3, #9966FF);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.le-lb-name {
    font-weight: 600;
    color: #2d1b42;
    line-height: 1.35;
    word-break: break-word;
}

.le-lb-you-badge {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    background: #6405C3;
    color: #fff;
    padding: 0.12rem 0.4rem;
    border-radius: 4px;
    vertical-align: middle;
    margin-left: 0.25rem;
}

.le-lb-xp-badge {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #6405C3;
    background: rgba(100, 5, 195, 0.08);
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    white-space: nowrap;
}

.le-lb-acc-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: flex-start; /* Keeps accuracy aligned left under its heading */
}

.le-lb-bar-track {
    flex: 1;
    height: 8px;
    background: #eee8f8;
    border-radius: 999px;
    overflow: hidden;
    min-width: 50px;
}

.le-lb-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #6405C3, #9966FF);
    border-radius: 999px;
}

.le-lb-acc-val {
    font-size: 0.82rem;
    font-weight: 700;
    color: #2ECC71;
    min-width: 42px;
    text-align: right;
    flex-shrink: 0;
}

@media (max-width: 575px) {
    .le-lb-table thead {
        display: none;
    }

    .le-lb-table,
    .le-lb-table tbody,
    .le-lb-table tr,
    .le-lb-table td {
        display: block;
        width: 100%;
    }

    .le-lb-table tbody tr {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid #f0ebf8;
        position: relative;
    }

    .le-lb-table tbody tr:last-child {
        border-bottom: none;
    }

    .le-lb-td-rank {
        position: absolute;
        top: 0.85rem;
        left: 1rem;
        text-align: left !important;
    }

    .le-lb-td-student {
        padding-left: 3.5rem !important;
        padding-top: 0.5rem !important;
        border-bottom: none !important;
    }

    .le-lb-td-xp,
    .le-lb-td-acc {
        padding-left: 3.5rem !important;
        padding-top: 0.35rem !important;
        border-bottom: none !important;
        text-align: left !important;
    }

    .le-lb-th-acc,
    .le-lb-acc-cell {
        max-width: 100%;
    }
}

/* ─── Study Groups ───────────────────────────────────────────────────── */
.sg-page .sg-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.sg-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #f8f4ff;
    border: 1px solid #e8dff5;
    color: #6405C3;
    font-weight: 600;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    font-size: 0.85rem;
}

.sg-tabs .nav-link {
    color: #666;
    font-weight: 600;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.65rem 1rem;
}

.sg-tabs .nav-link.active {
    color: #6405C3 !important;
    background: transparent;
    border-bottom-color: #6405C3;
}

.sg-tab-content {
    min-height: 200px;
}

.sg-groups-grid {
    display: grid;
    gap: 1rem;
}

.sg-card {
    background: #fff;
    border: 1px solid #eee8f8;
    border-radius: 12px;
    padding: 1rem 1.15rem;
    box-shadow: 0 2px 8px rgba(100, 5, 195, 0.04);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.sg-card:hover {
    border-color: #d9c9f5;
    box-shadow: 0 4px 16px rgba(100, 5, 195, 0.08);
}

.sg-card-top {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
}

.sg-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: linear-gradient(135deg, #6405C3, #9966FF);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sg-card-main {
    flex: 1;
    min-width: 0;
}

.sg-card-title-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.sg-card-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #222;
}

.sg-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.35rem;
    font-size: 0.82rem;
    color: #777;
}

.sg-card-meta i {
    color: #6405C3;
    margin-right: 0.25rem;
}

.sg-card-id {
    font-size: 0.78rem;
    font-weight: 700;
    color: #9966FF;
    background: #f8f4ff;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
}

.sg-card-desc {
    margin: 0.75rem 0 0;
    font-size: 0.88rem;
    color: #555;
    line-height: 1.5;
}

.sg-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid #f3eefb;
}

.sg-card-actions {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.sg-create-card,
.sg-join-card {
    background: #faf8ff;
    border: 1px solid #eee8f8;
    border-radius: 12px;
    padding: 1.25rem;
}

.sg-btn-primary {
    background: #6405C3;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-weight: 600;
}

.sg-btn-primary:hover {
    background: #4a0391;
    color: #fff;
}

.sg-btn-outline {
    background: #fff;
    color: #6405C3;
    border: 1px solid #6405C3;
    border-radius: 8px;
}

.sg-btn-outline:hover {
    background: #f8f4ff;
    color: #6405C3;
}

.sg-btn-muted {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.sg-btn-danger {
    background: #fff;
    color: #dc3545;
    border: 1px solid #dc3545;
    border-radius: 8px;
}

.sg-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: #f0ebf8;
    color: #6405C3;
}

.sg-badge-creator {
    background: linear-gradient(135deg, #6405C3, #9966FF);
    color: #fff;
}

.sg-loading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 2rem 0;
    color: #777;
}

.sg-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: #888;
}

.sg-empty i {
    font-size: 2.5rem;
    color: #d9c9f5;
    margin-bottom: 0.75rem;
}

.sg-alert {
    padding: 0.65rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.sg-alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.sg-alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.sg-members-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sg-members-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.sg-members-list li:last-child {
    border-bottom: none;
}

.sg-member-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6405C3, #9966FF);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.sg-invite-box {
    background: #faf8ff;
    border: 1px dashed #d9c9f5;
    border-radius: 10px;
    padding: 0.85rem;
}

.sg-modal .modal-header {
    border-bottom: 1px solid #f0ebf8;
}

@media (max-width: 575px) {
    .sg-card-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .sg-card-actions {
        width: 100%;
    }

    .sg-card-actions .btn {
        flex: 1;
    }
}

/* ─── Study Group Chat ───────────────────────────────────────────────── */
.sg-chat-modal .modal-body {
    min-height: 420px;
    max-height: 70vh;
}

.sg-chat-header {
    border-bottom: 1px solid #f0ebf8;
    background: linear-gradient(135deg, #faf8ff 0%, #fff 100%);
}

.sg-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: #f9f7fc;
    min-height: 300px;
    max-height: 52vh;
}

.sg-chat-loading,
.sg-chat-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 220px;
    color: #888;
    text-align: center;
}

.sg-chat-empty i {
    font-size: 2rem;
    color: #d9c9f5;
}

.sg-chat-bubble-wrap {
    display: flex;
    margin-bottom: 0.75rem;
}

.sg-chat-mine {
    justify-content: flex-end;
}

.sg-chat-theirs {
    justify-content: flex-start;
}

.sg-chat-bubble {
    max-width: 175px;
    padding: 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    line-height: 1.45;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    word-break: break-word;
    /* Deprecated but great for older browser fallback */
    overflow-wrap: break-word;
    /* Forces unbroken words to split and wrap */
}

.sg-chat-mine .sg-chat-bubble {
    background: linear-gradient(135deg, #6405C3, #9966FF);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.sg-chat-theirs .sg-chat-bubble {
    background: #fff;
    color: #333;
    border: 1px solid #eee8f8;
    border-bottom-left-radius: 4px;
}

.sg-chat-sender {
    font-size: 0.65rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
    opacity: 0.85;
}

.sg-chat-time {
    font-size: 0.6rem;
    margin-top: 0.25rem;
    opacity: 0.7;
    text-align: right;
}

.sg-chat-form {
    padding: 0.75rem;
    border-top: 1px solid #eee8f8;
    background: #fff;
}

.sg-chat-form textarea {
    resize: none;
    border-radius: 8px 0 0 8px;
    max-height: 100px;
}

.sg-chat-form .sg-btn-primary {
    border-radius: 0 8px 8px 0;
    padding: 0 1.1rem;
}

#tutorModeSelect.tutor-mode-dropdown,
#tutorModeSelect.form-select-sm {
    height: 34px !important;
    line-height: 34px;
    padding: 0 15px 0 5px;
    color: #1F2937;
    background-color: #ffffff;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 10px;
    text-align: center;
    text-align-last: center;
    display: inline-block;
}

.autocomplete.flex-grow-1 {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* Container Box Frame Width Layout Configuration */
.modal-custom-width {
    max-width: 440px;
    width: 100%;
    margin: 1.75rem auto;
}

/* Premium Main Panel Background Frame */
.sg-premium-modal {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

/* Premium Custom Header Layout */
.modal-header-premium {
    background: #6405C3;
    padding: 20px 24px 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-title-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.3px;
    margin: 0;
}

/* Custom Subtitle Meta Text styling */
.sg-members-count-badge {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    margin-top: 2px;
}

/* Sleek Icon Style Close Window button layout */
.custom-close-btn {
    background: rgba(255, 255, 255, 0.06);
    border: none;
    color: rgba(255, 255, 255, 0.7);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.custom-close-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    transform: rotate(90deg);
}

/* Main Body Configuration Inner Margin Adjustments */
.modal-body-premium {
    padding: 20px 24px 24px 24px;
}

/* Dynamic Members Scroll Container Area Layout */
.custom-member-scroll-list {
    max-height: 240px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding-right: 4px;
}

/* Ultra Clean custom scrollbar logic */
.custom-member-scroll-list::-webkit-scrollbar {
    width: 4px;
}

.custom-member-scroll-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

/* White Invite Panel Layout */
.sg-invite-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.invite-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.text-purple-accent {
    color: #6366f1;
}

.invite-label {
    font-size: 0.825rem;
    font-weight: 600;
    color: #475569;
    margin: 0;
}

/* Modern Input Field wrapper adjustments inside white card */
.modern-input-group {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
}

.unique-link-input {
    border: none !important;
    background: transparent !important;
    color: #1e293b !important;
    font-size: 0.85rem !important;
    font-weight: 500;
    padding: 10px 14px !important;
    box-shadow: none !important;
    flex: 1;
}

/* High Contrast Accent Copy Button Style */
.sg-premium-copy-btn {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    font-size: 0.825rem !important;
    padding: 0 16px !important;
    border: none !important;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: filter 0.2s ease !important;
}

.sg-premium-copy-btn:hover {
    filter: brightness(1.1);
}

/* Invite Bottom Metadata footer row section layout */
.invite-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}

.invite-footer-text {
    font-size: 0.825rem;
    color: #64748b;
    font-weight: 500;
}

.badge-group-id {
    background-color: #f5f3ff;
    color: #4f46e5;
    font-weight: 700;
    font-size: 0.825rem;
    padding: 4px 12px;
    border-radius: 8px;
    border: 1px solid #e0e7ff;
}

.custom-btn-one,
.custom-btn-two {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    /* standard btn-sm size */
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    text-transform: capitalize;
    /* Optional: cleans up text casing */
}

/* --- Smart Practice Button (Primary Style) --- */
.custom-btn-one {
    color: #4f46e5;
    background-color: transparent;
    border: 1px solid #4f46e5;
    font-size: 10px !important;

}

.custom-btn-one:hover {
    color: #fff;
    background-color: #4f46e5;
    border-color: #4f46e5;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.15);
}

/* --- Download Offline Pack Button (Secondary Style) --- */
.custom-btn-two {
    color: #6c757d;
    background-color: transparent;
    border: 1px solid #6c757d;
    font-size: 10px !important;
}

.custom-btn-two:hover {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.15);
}

/* Active/Focus states for accessibility */
.custom-btn-one:focus,
.custom-btn-two:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
}

.custom-scrollbar::-webkit-scrollbar {
    width: 0.5px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: #ba68c8;
    border-radius: 10px;
}

.custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: #ba68c8 transparent;
}

/* Container for alignment: Forces a clean 2-column grid */
#badgesList {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    width: 100%;
}

/* Premium Gamified Badge Component (Modified for 2 per row) */
.le-badge-premium {
    /* Magic calculation to perfectly fit 2 items per row with gap included */
    width: calc(50% - 6px);
    box-sizing: border-box;

    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(245, 238, 255, 0.95) 100%);
    border: 1.5px solid #e1d0fc;
    color: #5b06b0;

    padding: 10px 14px;
    /* Slightly increased padding for row balancing */
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.3px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* Center content nicely in its half-width box */
    gap: 6px;
    box-shadow: 0 4px 10px rgba(100, 5, 195, 0.04),
        0 1px 3px rgba(0, 0, 0, 0.02);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Hover Micro-interaction: Changes color & elevates up */
.le-badge-premium:hover {
    transform: translateY(-3px) scale(1.02);
    background: linear-gradient(135deg, #6405C3 0%, #884eff 100%);
    color: #ffffff !important;
    border-color: #ffd700;
    /* Rich Golden Boundary */
    box-shadow: 0 8px 20px rgba(100, 5, 195, 0.22),
        0 0 10px rgba(255, 215, 0, 0.15);
}

/* Shimmer flare animation path */
.le-badge-premium::after {
    content: '';
    position: absolute;
    top: 0;
    left: -60%;
    width: 30%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
}

.le-badge-premium:hover::after {
    animation: badgeShine 0.8s ease-out forwards;
}

@keyframes badgeShine {
    100% {
        left: 160%;
    }
}

/* Empty State / Locked Design */
.no-badges-placeholder {
    width: 100%;
    /* Spans full width when empty */
    color: #8c8c8c;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.03);
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px dashed rgba(0, 0, 0, 0.1);
}

.progress-custom-container {
    background-color: rgba(100, 5, 195, 0.08);
    border-radius: 20px;
    overflow: hidden;
    /* Clean clipping for the vertical fill */
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.08);
}

.progress-bar-animated-glow {
    /* Changed gradient direction slightly to look stellar on a vertical block */
    background: linear-gradient(180deg, #9966FF 0%, #6405C3 50%, #6405C3 100%);
    background-size: auto 200%;
    /* Glow shifts vertically */
    border-radius: 10px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff !important;
    font-size: 0.85rem;
    font-weight: 800;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);

    will-change: height;
    /* Performance hint for vertical movement */
    animation: shineGradient Vertical 2.5s linear infinite;
    transition: height 1.8s cubic-bezier(0.25, 1, 0.5, 1);
    /* Fluid vertical growth */

    box-shadow: 0 -3px 12px rgba(153, 102, 255, 0.3),
        0 0 4px rgba(100, 5, 195, 0.2);
}

/* Shimmer & Pop animations adjusted for vertical alignment */
@keyframes shineGradientVertical {
    0% {
        background-position: center 0%;
    }

    100% {
        background-position: center -200%;
    }
}

.xp-pop {
    animation: xpPopPulseVertical 0.4s ease-out;
}

@keyframes xpPopPulseVertical {
    0% {
        transform: scaleX(1);
    }

    40% {
        transform: scaleX(1.12);
        /* Bulges outward slightly to show completion impact */
    }

    100% {
        transform: scaleX(1);
    }
}
/* ============ Collapsible sidebar ============ */

/* Turn the Bootstrap row into a flex row that we control directly so the
   two columns can animate their widths smoothly instead of jumping between
   Bootstrap's fixed grid classes. */
.wish-list-row {
    display: flex;
    flex-wrap: wrap;
    position: relative;
}

.wish-sidebar-col {
    position: relative;
    transition: flex-basis 0.3s ease, max-width 0.3s ease, width 0.3s ease;
    flex: 0 0 auto;
}

.wish-content-col {
    transition: flex-basis 0.3s ease, max-width 0.3s ease, width 0.3s ease;
    flex: 1 1 auto;
    min-width: 0; /* allow content, canvases etc. to shrink/grow properly */
}

/* Collapsed state: sidebar shrinks to an icon rail, content column
   expands to fill the freed space. */
@media (min-width: 992px) {
    .wish-list-row.sidebar-collapsed .wish-sidebar-col {
        flex: 0 0 76px;
        max-width: 76px;
        width: 76px;
    }

    .wish-list-row.sidebar-collapsed .wish-content-col {
        flex: 1 1 calc(100% - 76px);
        max-width: calc(100% - 76px);
    }
}

.wish-list-search {
    position: relative;
    overflow: hidden;
}

/* Toggle button */
.sidebar-toggle-btn {
    position: absolute;
    top: 8px;
    right: -14px;
    z-index: 5;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid #e2e2e2;
    background: #fff;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.sidebar-toggle-btn:hover {
    background: #6f42c1;
    color: #fff;
}

/* Hide text labels and profile details when collapsed, keep icons/image */
.wish-list-row.sidebar-collapsed .sidebar-text,
.wish-list-row.sidebar-collapsed .student-profile-info h4,
.wish-list-row.sidebar-collapsed .student-profile-info span {
    display: none;
}

.wish-list-row.sidebar-collapsed .btn-profile-menu {
    justify-content: center;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.wish-list-row.sidebar-collapsed .sidebar-icon {
    margin-right: 0 !important;
}

.wish-list-row.sidebar-collapsed .student-profile-info {
    text-align: center;
}

.wish-list-row.sidebar-collapsed .profile-image {
    width: 40px;
    height: 40px;
}

/* Small screens: keep the sidebar full-width and stacked, the toggle just
   shows/hides it entirely rather than shrinking to icons (there isn't
   enough horizontal room for a rail layout on mobile). */
@media (max-width: 991.98px) {
    .wish-list-row.sidebar-collapsed .wish-sidebar-col {
        display: none;
    }
    .sidebar-toggle-btn {
        right: 8px;
    }
}

/* Study group create form subject dropdown */
.sg-create-card .select2-container {
    width: 100% !important;
}

.sg-create-card .select2-container--default .select2-selection--single {
    height: 48px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: #fff;
    display: flex;
    align-items: center;
}

.sg-create-card .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #6c757d;
    line-height: 46px;
    padding-left: 14px;
    padding-right: 38px;
}

.sg-create-card .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 46px;
    right: 10px;
}

.sg-create-card .select2-container--default.select2-container--open .select2-selection--single,
.sg-create-card .select2-container--default .select2-selection--single:focus {
    border-color: #6f2bd8;
    box-shadow: 0 0 0 0.2rem rgba(111, 43, 216, 0.12);
}

.select2-container--default .sg-course-select-dropdown {
    border-color: #e9ddff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 14px 34px rgba(34, 12, 71, 0.16);
}

.select2-container--default .sg-course-select-dropdown .select2-results__option {
    padding: 10px 14px;
}

.select2-container--default .sg-course-select-dropdown .select2-results__option--highlighted[aria-selected] {
    background-color: #6f2bd8;
    color: #fff;
}

.sg-confirm-popup {
    width: 360px !important;
    padding: 22px 24px 24px !important;
    border-radius: 8px !important;
}

.sg-confirm-icon {
    width: 64px !important;
    height: 64px !important;
    margin: 10px auto 16px !important;
}

.sg-confirm-icon .swal2-icon-content {
    font-size: 46px !important;
}

.sg-confirm-title {
    padding: 0 !important;
    font-size: 24px !important;
    line-height: 1.2 !important;
}

.sg-confirm-text {
    margin: 12px 0 0 !important;
    font-size: 16px !important;
}

.sg-confirm-actions {
    margin-top: 22px !important;
}

.sg-confirm-button {
    padding: 10px 18px !important;
    font-size: 15px !important;
    border-radius: 5px !important;
}

@media (max-width: 480px) {
    .sg-confirm-popup {
        width: calc(100% - 32px) !important;
    }
}
