/* Wiser Meet - Professional Video Calling Platform */

body {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
    min-height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23334155" stroke-width="0.5" opacity="0.3"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.025em;
}

.features-list .feature-item {
    transition: transform 0.2s ease;
}

.features-list .feature-item:hover {
    transform: translateX(10px);
}

.feature-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

/* Call Form */
.call-form-container {
    position: relative;
    z-index: 2;
}

.card-header.bg-gradient {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%) !important;
    border: none;
}

/* Benefits Section */
.benefits-section {
    background: linear-gradient(to bottom, #ffffff, #f1f5f9);
    position: relative;
    color: #1e293b;
}

.benefit-card {
    transition: all 0.3s ease;
    border-radius: 1rem;
    background: white;
    color: #1e293b;
}

.benefit-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
}

.benefit-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.benefit-icon i {
    width: 24px;
    height: 24px;
}

/* Navigation */
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.wiser-logo {
    height: 40px;
    width: auto;
    filter: brightness(1.1);
}

.navbar {
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.call-controls {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--bs-dark);
    border-top: 1px solid var(--bs-border-color);
    padding: 1rem 0;
    z-index: 1000;
}

.call-info h5 {
    color: var(--bs-light);
    margin: 0;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    padding: 2rem 1rem 6rem 1rem; /* Extra bottom padding for controls */
    min-height: calc(100vh - 200px);
    transition: grid-template-columns 0.3s ease;
}

.video-participant {
    position: relative;
    background-color: var(--bs-gray-800);
    border-radius: 0.5rem;
    overflow: hidden;
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-participant video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.5rem;
}

.video-participant audio {
    display: none;
}

.participant-name {
    position: absolute;
    bottom: 0.5rem;
    left: 0.5rem;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    z-index: 10;
}

.video-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--bs-gray-400);
    height: 100%;
}

.video-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.local-video {
    border: 2px solid var(--bs-primary);
}

.connection-indicator {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--bs-success);
    z-index: 10;
}

.connection-indicator.poor {
    background-color: var(--bs-warning);
}

.connection-indicator.disconnected {
    background-color: var(--bs-danger);
}

/* Responsive video grid */
@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: 1fr !important;
        padding: 1rem 0.5rem 6rem 0.5rem;
        gap: 0.75rem;
    }
    
    .video-participant {
        aspect-ratio: 16/9;
        max-height: 40vh;
    }
    
    .call-controls .btn {
        padding: 0.5rem;
    }
    
    .call-info h5 {
        font-size: 1rem;
    }
}

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Muted indicator */
.muted-indicator {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background-color: var(--bs-danger);
    color: white;
    padding: 0.25rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    z-index: 10;
}

/* Video disabled indicator */
.video-disabled {
    background-color: var(--bs-gray-700);
}

.video-disabled .video-placeholder {
    color: var(--bs-gray-500);
}

/* Screen share indicator */
.screen-share-indicator {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background-color: var(--bs-success);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    z-index: 10;
    font-weight: 500;
}

/* Transcription Panel Styles */
.transcription-panel {
    position: fixed;
    left: 0;
    top: 120px;
    bottom: 80px;
    width: 350px;
    background-color: var(--bs-dark);
    border-right: 1px solid var(--bs-border-color);
    display: flex;
    flex-direction: column;
    z-index: 999;
    max-height: calc(100vh - 200px);
}

.transcription-header {
    padding: 1rem;
    border-bottom: 1px solid var(--bs-border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bs-gray-800);
}

.transcription-header h6 {
    color: var(--bs-light);
    margin: 0;
}

.transcription-controls {
    display: flex;
    gap: 0.5rem;
}

.transcription-messages {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
    max-height: none;
    min-height: 0;
}

.transcription-message {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background-color: var(--bs-gray-800);
    border-radius: 0.5rem;
    border-left: 3px solid var(--bs-primary);
}

.transcription-message.own-transcription {
    background-color: rgba(13, 110, 253, 0.2);
    border-left-color: var(--bs-success);
}

.transcription-author {
    font-weight: 600;
    color: var(--bs-warning);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.transcription-content {
    color: var(--bs-white);
    line-height: 1.4;
    font-size: 0.95rem;
    font-weight: 500;
}

.transcription-timestamp {
    font-size: 0.75rem;
    color: var(--bs-gray-400);
    margin-top: 0.25rem;
}

.transcription-info {
    font-size: 0.875rem;
}

/* Video grid adjustments for transcription */
.video-grid.with-transcription {
    width: calc(100% - 350px);
    margin-left: 350px;
}

.video-grid.with-both-panels {
    width: calc(100% - 700px);
    margin-left: 350px;
}

/* Main content layout */
.main-content {
    display: flex;
    height: calc(100vh - 200px);
    position: relative;
}

/* Video grid adjustments for chat */
.video-grid.with-chat {
    width: calc(100% - 280px);
}

/* Chat Panel Styles */
.chat-panel {
    position: fixed;
    right: 0;
    top: 120px;
    bottom: 80px;
    width: 280px;
    background-color: var(--bs-dark);
    border-left: 1px solid var(--bs-border-color);
    display: flex;
    flex-direction: column;
    z-index: 999;
    max-height: 60vh;
}

.chat-header {
    padding: 1rem;
    border-bottom: 1px solid var(--bs-border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bs-gray-800);
}

.chat-header h6 {
    color: var(--bs-light);
    display: flex;
    align-items: center;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
    max-height: none;
    min-height: 0;
}

.chat-message {
    margin-bottom: 0.75rem;
    word-wrap: break-word;
}

.chat-message.own-message {
    text-align: right;
}

.chat-message .message-author {
    font-size: 0.75rem;
    color: var(--bs-secondary);
    margin-bottom: 0.25rem;
}

.chat-message .message-content {
    background-color: var(--bs-gray-700);
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    display: inline-block;
    max-width: 80%;
    color: var(--bs-light);
}

.chat-message.own-message .message-content {
    background-color: var(--bs-primary);
    color: white;
}

.chat-input {
    padding: 1rem;
    border-top: 1px solid var(--bs-border-color);
    background-color: var(--bs-gray-800);
}

.chat-input .input-group input {
    border-radius: 0.375rem 0 0 0.375rem;
}

.chat-input .input-group button {
    border-radius: 0 0.375rem 0.375rem 0;
}

/* System messages */
.chat-message.system-message .message-content {
    background-color: var(--bs-info);
    color: white;
    font-style: italic;
    text-align: center;
    width: 100%;
    max-width: 100%;
}

/* Screen share indicator */
.screen-share-indicator {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background-color: var(--bs-success);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    z-index: 10;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .chat-panel {
        width: 90%;
        left: 5%;
        top: 140px;
        bottom: 100px;
        height: 50vh;
        max-height: 400px;
        border-left: none;
        border: 1px solid var(--bs-border-color);
        border-radius: 0.5rem;
    }
    
    .video-grid.with-chat {
        width: 100%;
        opacity: 0.3;
    }
    
    .main-content {
        flex-direction: column;
    }
    
    .call-controls {
        z-index: 1001; /* Above chat panel */
    }
    
    .chat-input {
        padding: 0.75rem;
        position: sticky;
        bottom: 0;
        background-color: var(--bs-gray-800);
    }
    
    .chat-messages {
        padding-bottom: 1rem;
        max-height: 200px;
    }
    
    /* Ensure input is above iOS keyboard */
    .chat-input .form-control {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    /* Transcription panel mobile styles */
    .transcription-panel {
        width: 100%;
        left: 0;
        top: auto;
        bottom: 0;
        height: 40vh;
        max-height: 300px;
        border-left: none;
        border-top: 1px solid var(--bs-border-color);
        border-radius: 0.5rem 0.5rem 0 0;
        z-index: 1002;
    }
    
    .video-grid.with-transcription {
        width: 100%;
        height: 60vh;
        margin-left: 0;
        padding-bottom: 40vh; /* Make room for transcription panel */
    }
    
    .video-grid.with-both-panels {
        width: 100%;
        height: 40vh;
        margin-left: 0;
        padding-bottom: 60vh; /* More room when both panels open */
    }
    
    .transcription-messages {
        max-height: 200px;
    }
}
