/* ============================================================
   HAWAIIAN HILLS — Built-in Video Sanctuary (Zoom-like Portal)
   ============================================================ */

:root {
    --color-video-dark: #0f1714;
    --color-video-glass: rgba(15, 23, 20, 0.85);
    --color-video-border: rgba(180, 196, 185, 0.2);
    --color-video-active-border: #D4AF37;
    --color-video-glow: rgba(212, 175, 55, 0.4);
}

/* Fullscreen Overlay */
#video-conference-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--color-video-dark);
    background-image: radial-gradient(circle at top right, rgba(122, 143, 129, 0.15), transparent 40%),
                      radial-gradient(circle at bottom left, rgba(212, 175, 55, 0.08), transparent 40%);
    z-index: 10000;
    display: none;
    flex-direction: column;
    font-family: 'Montserrat', sans-serif;
    color: #fbf9f6;
    overflow: hidden;
}

/* Header Info */
.video-header {
    height: 70px;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 23, 20, 0.5);
    border-bottom: 1px solid var(--color-video-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10;
}

.video-header-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 500;
    color: #fbf9f6;
    letter-spacing: -0.01em;
}

.video-header-meta {
    display: flex;
    align-items: center;
    gap: 15px;
}

.video-badge {
    background: rgba(212, 175, 55, 0.15);
    color: #D4AF37;
    border: 1px solid rgba(212, 175, 55, 0.3);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.video-recording-indicator {
    display: none;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: #e74c3c;
    font-weight: 600;
}

.video-recording-dot {
    width: 10px;
    height: 10px;
    background: #e74c3c;
    border-radius: 50%;
    animation: blinkRed 1.2s infinite;
}

@keyframes blinkRed {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 1; }
}

/* Workspace layout (Grid Left, Sidebar Right) */
.video-workspace {
    flex-grow: 1;
    display: flex;
    position: relative;
    overflow: hidden;
    height: calc(100vh - 150px);
}

/* Video Grid Panel */
.video-grid-panel {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

#video-grid-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    justify-content: center;
    gap: 15px;
    transition: all 0.3s ease;
}

/* Video Cell Cards */
.video-cell {
    position: relative;
    border-radius: 8px;
    background: rgba(15, 23, 20, 0.9);
    border: 1.5px solid var(--color-video-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.video-cell.active-speaker {
    border-color: var(--color-video-active-border);
    box-shadow: 0 0 15px var(--color-video-glow);
}

.video-cell video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    transform: scaleX(-1); /* Mirror camera stream */
}

/* Unmirror screen shares */
.video-cell.screen-share-cell video {
    transform: none;
    object-fit: contain;
}

/* Participant Profile Avatar Placeholder (Google Meet Style) */
.video-avatar-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    z-index: 2;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.video-avatar-circle {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--color-video-border);
    border: 2px solid var(--color-video-active-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: #fbf9f6;
    box-shadow: 0 0 20px rgba(180, 196, 185, 0.1);
    position: relative;
}

.video-avatar-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1.5px solid var(--color-video-active-border);
    animation: avatarPulse 2.5s infinite ease-out;
}

@keyframes avatarPulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.6); opacity: 0; }
}

.video-cell-name {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(10, 15, 12, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1.5px solid var(--color-video-border);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 5;
}

.video-cell-indicators {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
    z-index: 5;
}

.indicator-badge {
    background: rgba(10, 15, 12, 0.7);
    backdrop-filter: blur(8px);
    border: 1.5px solid var(--color-video-border);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.indicator-badge.hand-raised {
    background: rgba(212, 175, 55, 0.9);
    border-color: #D4AF37;
    animation: gentleBreathe 1.5s infinite alternate;
}

@keyframes gentleBreathe {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

/* Sidebar Panel */
.video-sidebar {
    width: 360px;
    background: rgba(15, 23, 20, 0.6);
    border-left: 1px solid var(--color-video-border);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: none;
    flex-direction: column;
    height: 100%;
    z-index: 9;
    box-shadow: -10px 0 30px rgba(0,0,0,0.2);
}

.video-sidebar-tabs {
    display: flex;
    border-bottom: 1px solid var(--color-video-border);
    background: rgba(10, 15, 12, 0.4);
}

.sidebar-tab {
    flex: 1;
    padding: 15px 0;
    text-align: center;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s;
    border-bottom: 2px solid transparent;
}

.sidebar-tab.active {
    opacity: 1;
    color: var(--color-video-active-border);
    border-bottom-color: var(--color-video-active-border);
    background: rgba(15, 23, 20, 0.3);
}

.video-sidebar-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Chat Tab styling */
.video-chat-log {
    height: calc(100% - 70px);
    overflow-y: auto;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.video-chat-msg {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.03);
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    line-height: 1.4;
}

.chat-msg-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    font-size: 0.68rem;
    font-weight: 600;
}

.chat-msg-sender {
    color: var(--color-video-active-border);
}

.chat-msg-time {
    color: #828B85;
}

/* Participants Panel */
.participant-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.02);
    border-radius: 4px;
    margin-bottom: 8px;
    font-size: 0.8rem;
}

.participant-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.participant-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid var(--color-video-border);
}

.participant-actions {
    display: flex;
    gap: 8px;
}

/* Interactive Whiteboard Tab */
.whiteboard-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#whiteboard-canvas {
    background: #ffffff;
    border-radius: 6px;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.1);
    cursor: crosshair;
    touch-action: none;
    flex-grow: 1;
    min-height: 320px;
}

.whiteboard-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-video-border);
    border-radius: 4px;
}

.whiteboard-colors {
    display: flex;
    gap: 6px;
}

.color-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.2s;
}

.color-dot.active {
    border-color: #fff;
    transform: scale(1.15);
}

/* Controls Bar at bottom */
.video-footer {
    height: 80px;
    background: rgba(10, 15, 12, 0.9);
    border-top: 1px solid var(--color-video-border);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    z-index: 10;
}

.footer-left-info {
    font-size: 0.8rem;
    font-weight: 500;
    color: #828B85;
}

.video-controls-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-control {
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid var(--color-video-border);
    color: #fbf9f6;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-control:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(180, 196, 185, 0.4);
    transform: translateY(-2px);
}

.btn-control.active {
    background: #D4AF37;
    border-color: #D4AF37;
    color: #0f1714;
    box-shadow: 0 0 12px var(--color-video-glow);
}

.btn-control.active:hover {
    background: #AA8B28;
    border-color: #AA8B28;
}

.btn-control.muted-danger {
    background: #c0392b;
    border-color: #c0392b;
    color: #fff;
    box-shadow: 0 0 10px rgba(192, 57, 43, 0.3);
}

.btn-control.muted-danger:hover {
    background: #a33026;
}

.btn-control.btn-end-call {
    background: #e74c3c;
    border-color: #e74c3c;
    color: #fff;
    width: 60px;
    border-radius: 30px;
    font-weight: 600;
}

.btn-control.btn-end-call:hover {
    background: #c0392b;
    border-color: #c0392b;
    transform: translateY(-2px) scale(1.02);
}

/* Reactions popover and floating emojis */
.reactions-panel-toggle {
    position: relative;
}

.reactions-popover {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(10, 15, 12, 0.95);
    border: 1px solid var(--color-video-border);
    backdrop-filter: blur(10px);
    padding: 10px 15px;
    border-radius: 24px;
    display: none;
    gap: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
    z-index: 1000;
    pointer-events: auto;
    animation: popupScale 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popupScale {
    0% { transform: translateX(-50%) scale(0.6) translateY(20px); opacity: 0; }
    100% { transform: translateX(-50%) scale(1) translateY(0); opacity: 1; }
}

.reactions-emoji-item {
    font-size: 1.3rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.reactions-emoji-item:hover {
    transform: scale(1.3);
}

.floating-emoji {
    position: absolute;
    bottom: 100px;
    font-size: 2.2rem;
    pointer-events: none;
    z-index: 100;
    animation: floatEmojiUp 3s cubic-bezier(0.08, 0.72, 0.29, 0.97) forwards;
    text-shadow: 0 0 10px rgba(0,0,0,0.3);
}

@keyframes floatEmojiUp {
    0% {
        transform: translate3d(0, 0, 0) scale(0.5);
        opacity: 0;
    }
    10% {
        opacity: 1;
        transform: translate3d(var(--drift-x, 0px), -20px, 0) scale(1.1);
    }
    100% {
        transform: translate3d(var(--end-x, 0px), -400px, 0) scale(0.8);
        opacity: 0;
    }
}

/* Premium Gold block dialog */
.gold-warning-modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(10, 15, 12, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 20000;
    display: none;
    align-items: center;
    justify-content: center;
}

.gold-warning-card {
    background: #fbf9f6;
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h40v40H0V0zm20 20h20v20H20V20zM0 20h20v20H0V20zM20 0h20v20H20V0z' fill='%23f5efeb' fill-opacity='0.4' fill-rule='evenodd'/%3E%3C/svg%3E");
    border-radius: 4px;
    border: 1.5px solid var(--color-cream);
    border-top: 5px solid #D4AF37;
    max-width: 500px;
    width: 90%;
    padding: 40px 30px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    text-align: center;
    position: relative;
}

.gold-warning-card::before {
    content: '';
    position: absolute;
    top: 8px; left: 8px; right: 8px; bottom: 8px;
    border: 1px solid var(--color-sage-light);
    pointer-events: none;
    border-radius: 2px;
}

.gold-warning-icon {
    font-size: 3rem;
    color: #D4AF37;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(212,175,55,0.2);
}

.gold-warning-card h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.85rem;
    color: #2F3632;
    margin-bottom: 12px;
    font-weight: 500;
}

.gold-warning-card p {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.15rem;
    font-style: italic;
    color: #828B85;
    line-height: 1.6;
    margin-bottom: 28px;
}

.gold-warning-card button {
    background: #7A8F81;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s;
}

.gold-warning-card button:hover {
    background: #D4AF37;
    transform: translateY(-1px);
}
