/**
 * ============================================================================
 * THE HIGHTOWER SCHOOL OF DIGITAL ARTS & APPLIED SCIENCES
 * Component: The Big Kids Lounge & ChatterBox Social Hub Stylesheet (v9.18.00)
 * Target Devices: iPad (9th Gen), Samsung Galaxy Tab A9+, Surface Pro
 * File: css/lounge.css
 * Author: Tim Hightower (Lead Admin) & Engineering Subsystem
 * ============================================================================
 */

.lounge-scroll-viewport {
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-sizing: border-box;
}

/* =========================================================================
   TOP ROW: 50 / 50 FEATURED DUO (CHATTERBOX + CREATIVE STUDIO / CODY)
   ========================================================================= */
.lounge-top-duo-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 16px !important;
    width: 100%;
}

@media (max-width: 720px) {
    .lounge-top-duo-grid {
        grid-template-columns: 1fr !important;
    }
}

.lounge-feature-card {
    position: relative;
    background: #090d16;
    border-radius: 16px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lounge-feature-card:hover {
    transform: translateY(-2px);
}

.chatterbox-card {
    border: 1.5px solid #f472b6;
    box-shadow: 0 0 20px rgba(244, 114, 182, 0.15);
}

.prompt-card {
    border: 1.5px solid #818cf8;
    background: linear-gradient(135deg, rgba(30, 27, 75, 0.8), rgba(79, 70, 229, 0.25));
    box-shadow: 0 0 20px rgba(129, 140, 248, 0.15);
}

.feature-icon-badge {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 10px;
}

.pink-badge {
    background: rgba(244, 114, 182, 0.2);
    color: #f472b6;
}

.purple-badge {
    background: rgba(129, 140, 248, 0.2);
    color: #a5b4fc;
}

.feature-title {
    margin: 0 0 6px 0;
    font-family: 'Fredoka', cursive;
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
}

.feature-desc {
    margin: 0;
    font-size: 0.8rem;
    color: #94a3b8;
    line-height: 1.45;
}

.chatterbox-contact-tray {
    width: 100%;
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 215px;
    overflow-y: auto;
    padding-right: 2px;
}

.chatterbox-contact-row {
    background: #1e1b4b;
    border: 1px solid rgba(244, 114, 182, 0.4);
    padding: 7px 10px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.contact-info { text-align: left; min-width: 0; }
.contact-name { font-weight: 700; color: #ffffff; font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.contact-role { font-size: 0.68rem; color: #f472b6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.contact-actions {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.btn-contact-call {
    background: #059669;
    border: none;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    color: #ffffff;
    cursor: pointer;
    font-size: 0.72rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.12s ease;
}

.btn-contact-call:active {
    transform: scale(0.92);
}

/* =========================================================================
   BOTTOM ROW: 4 PILL LAUNCHERS (YOUTUBE, COLORING, PLAY STORE, ARCADE)
   ========================================================================= */
.lounge-bottom-quad-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 12px !important;
    width: 100%;
}

@media (max-width: 640px) {
    .lounge-bottom-quad-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

.lounge-pill-card {
    background: #090d16;
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.lounge-pill-card:hover {
    transform: translateY(-2px);
}

.youtube-pill { border: 1.5px solid #ef4444; }
.youtube-pill:hover { box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4); }

.coloring-pill { border: 1.5px solid #f59e0b; }
.coloring-pill:hover { box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4); }

.playstore-pill { border: 1.5px solid #10b981; }
.playstore-pill:hover { box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4); }

.arcade-pill { border: 1.5px solid #38bdf8; }
.arcade-pill:hover { box-shadow: 0 4px 16px rgba(56, 189, 248, 0.4); }

.pill-icon { font-size: 1rem; }
.pill-name { font-size: 0.8rem; font-weight: 700; color: #ffffff; }

/* =========================================================================
   CHATTERBOX SOCIAL HUB WORKSPACE (CONTACTS, GROUPS & MESSENGER)
   ========================================================================= */
.cb-workspace-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 12px;
    height: 430px;
    min-height: 400px;
}

@media (max-width: 720px) {
    .cb-workspace-grid {
        grid-template-columns: 1fr;
        height: auto;
    }
}

.cb-left-sidebar {
    background: #090d16;
    border: 1.5px solid rgba(244, 114, 182, 0.4);
    border-radius: 14px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden;
}

.cb-sidebar-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.cb-tab-btn {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    font-family: 'Fredoka', cursive;
    font-size: 0.74rem;
    font-weight: 700;
    padding: 6px 8px;
    border-radius: 8px;
    cursor: pointer;
}

.cb-tab-btn.active {
    background: linear-gradient(135deg, #ec4899, #be185d);
    border-color: #f472b6;
    color: #ffffff;
}

.cb-list-scroll {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-right: 2px;
}

.cb-contact-card {
    background: #111827;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 8px 9px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cb-contact-card.pending {
    border-color: rgba(251, 191, 36, 0.55);
    background: rgba(251, 191, 36, 0.06);
}

.cb-thread-item {
    background: #111827;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 8px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    text-align: left;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.cb-thread-item.active {
    background: rgba(236, 72, 153, 0.16);
    border-color: #f472b6;
}

.cb-chip-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.cb-action-chip {
    background: #1e293b;
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #e2e8f0;
    font-family: 'Fredoka', cursive;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 7px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.cb-action-chip:hover {
    background: #0284c7;
    color: #fff;
}

.cb-chat-pane {
    background: #090d16;
    border: 1.5px solid rgba(56, 189, 248, 0.35);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.cb-chat-header {
    background: #0f172a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.cb-chat-feed {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cb-msg-bubble {
    max-width: 86%;
    padding: 9px 12px;
    border-radius: 13px;
    font-size: 0.8rem;
    line-height: 1.45;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.cb-msg-bubble.role-student {
    align-self: flex-end;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    border: 1px solid #38bdf8;
    border-bottom-right-radius: 2px;
}

.cb-msg-bubble.role-family,
.cb-msg-bubble.role-parent {
    align-self: flex-start;
    background: #0f172a;
    color: #f8fafc;
    border: 1px solid #10b981;
    border-left: 3px solid #10b981;
    border-bottom-left-radius: 2px;
}

.cb-msg-bubble.role-zoey {
    align-self: flex-start;
    background: #141124;
    color: #fce7f3;
    border: 1px solid #f472b6;
    border-left: 3px solid #f472b6;
    border-bottom-left-radius: 2px;
}

.cb-msg-bubble.role-finley {
    align-self: flex-start;
    background: #101426;
    color: #e0e7ff;
    border: 1px solid #818cf8;
    border-left: 3px solid #818cf8;
    border-bottom-left-radius: 2px;
}

.cb-shared-creation-card {
    background: rgba(6, 9, 17, 0.88);
    border: 1.5px solid #fbbf24;
    border-radius: 10px;
    padding: 9px 11px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cb-input-bar {
    background: #0f172a;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cb-modal-sheet {
    position: absolute;
    inset: 0;
    background: rgba(6, 9, 17, 0.96);
    backdrop-filter: blur(10px);
    z-index: 30;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
}

.cb-form-input {
    width: 100%;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-size: 0.78rem;
    padding: 7px 10px;
    border-radius: 8px;
    outline: none;
}

.cb-form-input:focus {
    border-color: #f472b6;
}