/* MCAS - Music Channel Automation System Styles */

:root {
    --sidebar-width: 250px;
    --navbar-height: 60px;
    --primary-color: #0d6efd;
    --dark-bg: #212529;
}

/* Layout */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    min-height: 100vh;
}

.wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.sidebar-nav .nav-link {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.sidebar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar-nav .nav-link.active {
    background-color: var(--primary-color);
}

.sidebar-footer {
    margin-top: auto;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    background-color: #f8f9fa;
}

/* Navbar */
.navbar {
    height: var(--navbar-height);
}

/* Cards */
.card {
    border-radius: 0.75rem;
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1) !important;
}

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

/* Tables */
.table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    color: #6c757d;
}

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

.btn-primary {
    box-shadow: 0 2px 4px rgba(13, 110, 253, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 4px 8px rgba(13, 110, 253, 0.4);
    transform: translateY(-1px);
}

/* Upload Zone */
.upload-zone {
    border-style: dashed !important;
    border-color: #dee2e6 !important;
    cursor: pointer;
    transition: all 0.2s ease;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--primary-color) !important;
    background-color: rgba(13, 110, 253, 0.05);
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.4em 0.8em;
}

/* Form Controls */
.form-control,
.form-select {
    border-radius: 0.5rem;
    padding: 0.625rem 1rem;
}

.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.form-control-lg {
    font-size: 1.1rem;
}

/* Alerts */
.alert {
    border-radius: 0.75rem;
    border: none;
}

/* Progress Steps */
.step-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Toast Container */
.toast-container {
    z-index: 9999;
}

/* Breadcrumb */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 0.5rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Responsive */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.3s ease;
}

/* Code/Pre */
pre {
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    max-height: 400px;
    overflow-y: auto;
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Status Colors */
.status-draft { color: #6c757d; }
.status-content_generated { color: #0dcaf0; }
.status-music_ready { color: #ffc107; }
.status-processing { color: #0d6efd; }
.status-completed { color: #198754; }
.status-uploaded { color: #dc3545; }

/* Progress Bar Animation */
.progress-bar-animated {
    animation: progress-bar-stripes 1s linear infinite;
}

@keyframes progress-bar-stripes {
    from { background-position: 1rem 0; }
    to { background-position: 0 0; }
}

/* Pulse Animation for Active Status */
.pulse {
    animation: pulse 2s infinite;
}

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

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 0.25rem;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-title {
    height: 1.5rem;
    width: 60%;
    margin-bottom: 0.75rem;
}

.skeleton-img {
    height: 150px;
    margin-bottom: 1rem;
}

/* Empty State */
.empty-state {
    padding: 3rem 1rem;
    text-align: center;
}

.empty-state i {
    font-size: 4rem;
    color: #dee2e6;
    margin-bottom: 1rem;
}

/* Clickable Row */
.table-clickable tbody tr {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.table-clickable tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

/* Notification Badge */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    font-size: 0.7rem;
    line-height: 18px;
    text-align: center;
    border-radius: 50%;
}

/* File List */
.file-list-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    transition: background-color 0.15s ease;
}

.file-list-item:hover {
    background: #e9ecef;
}

.file-list-item .file-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
    color: #6c757d;
}

.file-list-item .file-info {
    flex: 1;
}

.file-list-item .file-name {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.file-list-item .file-meta {
    font-size: 0.85rem;
    color: #6c757d;
}

/* Sticky Header */
.sticky-header {
    position: sticky;
    top: var(--navbar-height);
    background: #f8f9fa;
    z-index: 100;
    padding: 1rem 0;
    margin: -1rem 0 1rem 0;
}

/* Video Preview */
.video-preview {
    position: relative;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #000;
}

.video-preview video {
    width: 100%;
    height: auto;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.video-preview:hover .video-overlay {
    opacity: 1;
}

/* Floating Action Button */
.fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
}

.fab:hover {
    transform: scale(1.1);
}
