/**
 * WebRTC Digital Presenter Styles
 */

/* Base styles */
:root {
    --bg-dark: #1a1a2e;
    --bg-darker: #16213e;
    --accent-primary: #0f3460;
    --accent-secondary: #e94560;
    --text-light: #ffffff;
    --text-muted: #a0a0a0;
}

body {
    background-color: #f8f9fa;
    min-height: 100vh;
}

/* Login page */
.login-page {
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-darker) 100%);
}

.login-page .card {
    background-color: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 12px;
}

.login-page .card-title {
    color: var(--bg-dark);
    font-weight: 600;
}

/* Video container with 16:9 aspect ratio */
.video-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    background-color: var(--bg-dark);
    border-radius: 8px;
    overflow: hidden;
}

.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: var(--bg-dark);
}

.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-dark);
    color: var(--text-muted);
    font-size: 1.1rem;
    z-index: 1;
}

.video-placeholder span {
    padding: 1rem 2rem;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

/* Audio meter */
.audio-meter {
    width: 100%;
    height: 24px;
    border-radius: 4px;
    background-color: #2a2a3e;
    display: block;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 1rem 1.25rem;
}

.card-header h5 {
    font-weight: 600;
    color: var(--bg-dark);
}

.card-body {
    padding: 1.25rem;
}

/* Form controls */
.form-control,
.form-select {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    padding: 0.5rem 0.75rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 0.2rem rgba(15, 52, 96, 0.25);
}

.form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.35rem;
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.btn-primary:hover {
    background-color: #0a2647;
    border-color: #0a2647;
}

.btn-success {
    background-color: #28a745;
    border-color: #28a745;
}

.btn-danger {
    background-color: var(--accent-secondary);
    border-color: var(--accent-secondary);
}

.btn-danger:hover {
    background-color: #c73e54;
    border-color: #c73e54;
}

/* Slide control buttons */
#slideControls .btn {
    min-width: 150px;
    font-size: 1.1rem;
    padding: 0.75rem 1.5rem;
}

/* Navbar */
.navbar {
    padding: 0.75rem 1rem;
}

.navbar-brand {
    font-weight: 600;
}

/* Connection status badges */
.badge {
    font-weight: 500;
    padding: 0.5em 0.8em;
    font-size: 0.85rem;
}

/* Input groups */
.input-group .form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Alerts */
.alert {
    border-radius: 8px;
    border: none;
}

/* Modal */
.modal-content {
    border-radius: 12px;
    border: none;
}

.modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.modal-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .video-container {
        margin-bottom: 1rem;
    }

    #slideControls .btn {
        min-width: 120px;
        font-size: 1rem;
        padding: 0.5rem 1rem;
    }
}

@media (max-width: 575.98px) {
    .card-body {
        padding: 1rem;
    }

    .row.mb-3 > div {
        margin-bottom: 0.75rem;
    }

    #slideControls .btn {
        min-width: 100px;
        display: block;
        width: 100%;
        margin-bottom: 0.5rem;
    }

    #slideControls .btn:last-child {
        margin-bottom: 0;
    }
}

/* View page specific */
.view-container .connection-status {
    transition: opacity 0.5s ease;
}

/* Animations */
@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

.badge.bg-warning {
    animation: pulse 1.5s infinite;
}

/* Dark theme for video areas */
.video-container,
.audio-meter {
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Utility classes */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
}
