/* ============================================================
   Radio Automation System – Stylesheet
   Thema: Professionell / Broadcast / Dark
   ============================================================ */

@import url('../fonts/bootstrap-icons.woff2');

:root {
    /* Farben */
    --ra-bg:            #0f1117;
    --ra-bg-secondary:  #181c27;
    --ra-bg-card:       #1e2235;
    --ra-bg-hover:      #252a3d;
    --ra-border:        #2a3050;
    --ra-border-light:  #353d5e;

    /* Akzentfarben */
    --ra-accent:        #e83a3a;
    --ra-accent-hover:  #ff4f4f;
    --ra-accent-glow:   rgba(232, 58, 58, 0.25);
    --ra-blue:          #3a8fe8;
    --ra-blue-hover:    #4fa0ff;
    --ra-green:         #2ecc71;
    --ra-yellow:        #f1c40f;
    --ra-orange:        #e67e22;

    /* Text */
    --ra-text:          #e8eaf0;
    --ra-text-muted:    #7a84a0;
    --ra-text-dim:      #4a5270;

    /* Navbar */
    --ra-navbar-height: 56px;
    --ra-footer-height: 32px;
    --ra-breadcrumb-height: 0px;

    /* Schatten */
    --ra-shadow:        0 2px 12px rgba(0,0,0,0.4);
    --ra-shadow-lg:     0 4px 24px rgba(0,0,0,0.6);

    /* Übergänge */
    --ra-transition:    all 0.18s ease;
}

/* ============================================================
   RESET & BASIS
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    background: var(--ra-bg);
    color: var(--ra-text);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    overflow: hidden;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--ra-bg); }
::-webkit-scrollbar-thumb { background: var(--ra-border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--ra-text-muted); }

/* ============================================================
   NAVBAR
   ============================================================ */
.ra-navbar {
    background: var(--ra-bg-secondary) !important;
    border-bottom: 1px solid var(--ra-border);
    height: var(--ra-navbar-height);
    padding: 0 !important;
    box-shadow: var(--ra-shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.ra-brand {
    color: var(--ra-text) !important;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.3px;
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 0 16px;
    height: var(--ra-navbar-height);
    border-right: 1px solid var(--ra-border);
    margin-right: 8px;
}

.ra-brand i {
    color: var(--ra-accent);
    font-size: 18px;
}

.navbar-nav .nav-link {
    color: var(--ra-text-muted) !important;
    font-size: 13px;
    font-weight: 500;
    padding: 0 14px !important;
    height: var(--ra-navbar-height);
    display: flex;
    align-items: center;
    border-bottom: 2px solid transparent;
    transition: var(--ra-transition);
    white-space: nowrap;
}

.navbar-nav .nav-link:hover {
    color: var(--ra-text) !important;
    background: var(--ra-bg-hover);
}

.navbar-nav .nav-link.active {
    color: var(--ra-text) !important;
    border-bottom-color: var(--ra-accent);
    background: rgba(232, 58, 58, 0.08);
}



/* ============================================================
   ON AIR INDICATOR
   ============================================================ */
.ra-onair {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(232, 58, 58, 0.12);
    border: 1px solid rgba(232, 58, 58, 0.3);
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--ra-accent);
}

.ra-onair-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ra-accent);
    animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--ra-accent-glow); }
    50%       { opacity: 0.7; box-shadow: 0 0 0 4px transparent; }
}

/* ============================================================
   LIVE CLOCK
   ============================================================ */
.ra-clock {
    font-family: 'Courier New', monospace;
    font-size: 15px;
    font-weight: 700;
    color: var(--ra-text);
    letter-spacing: 1px;
    min-width: 72px;
    text-align: right;
}

/* ============================================================
   NOTIFICATION BUTTON & BADGE
   ============================================================ */
.ra-btn-icon {
    background: transparent;
    border: 1px solid var(--ra-border);
    color: var(--ra-text-muted);
    border-radius: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: var(--ra-transition);
}

.ra-btn-icon:hover {
    background: var(--ra-bg-hover);
    color: var(--ra-text);
    border-color: var(--ra-border-light);
}

.ra-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--ra-accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 10px;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
}

/* ============================================================
   NOTIFICATION PANEL
   ============================================================ */
.ra-notification-panel {
    position: fixed;
    top: calc(var(--ra-navbar-height) + 4px);
    right: 12px;
    width: 360px;
    background: var(--ra-bg-card);
    border: 1px solid var(--ra-border-light);
    border-radius: 6px;
    box-shadow: var(--ra-shadow-lg);
    z-index: 1050;
    max-height: 420px;
    overflow-y: auto;
}

.ra-notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid var(--ra-border);
    font-weight: 600;
    font-size: 13px;
    color: var(--ra-text);
    position: sticky;
    top: 0;
    background: var(--ra-bg-card);
}

.ra-notification-item {
    padding: 10px 14px;
    border-bottom: 1px solid var(--ra-border);
    transition: var(--ra-transition);
    cursor: pointer;
}

.ra-notification-item:hover { background: var(--ra-bg-hover); }
.ra-notification-item:last-child { border-bottom: none; }

.ra-notification-item.unread { border-left: 3px solid var(--ra-accent); }
.ra-notification-item.type-warning { border-left-color: var(--ra-yellow); }
.ra-notification-item.type-error   { border-left-color: var(--ra-accent); }
.ra-notification-item.type-info    { border-left-color: var(--ra-blue); }

.ra-notification-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--ra-text);
    margin-bottom: 2px;
}

.ra-notification-msg {
    font-size: 12px;
    color: var(--ra-text-muted);
    margin-bottom: 4px;
}

.ra-notification-time {
    font-size: 11px;
    color: var(--ra-text-dim);
}

.ra-notification-empty {
    padding: 24px;
    text-align: center;
    color: var(--ra-text-muted);
    font-size: 13px;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.ra-main {
    margin-top: var(--ra-navbar-height);
    margin-bottom: var(--ra-footer-height);
    min-height: calc(100vh - var(--ra-navbar-height) - var(--ra-footer-height));
    overflow-x: hidden;
}

.ra-breadcrumb + .ra-main {
    margin-top: 0;
}

/* ============================================================
   FOOTER
   ============================================================ */
.ra-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--ra-footer-height);
    background: var(--ra-bg-secondary);
    border-top: 1px solid var(--ra-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    font-size: 11px;
    color: var(--ra-text-dim);
    z-index: 900;
}

.ra-footer-status {
    color: var(--ra-green);
    font-weight: 500;
}

/* ============================================================
   KARTEN & PANELS
   ============================================================ */
.ra-card {
    background: var(--ra-bg-card);
    border: 1px solid var(--ra-border);
    border-radius: 6px;
    overflow: hidden;
}

.ra-card-header {
    background: var(--ra-bg-secondary);
    border-bottom: 1px solid var(--ra-border);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    color: var(--ra-text);
}

.ra-card-body {
    padding: 14px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-ra-primary {
    background: var(--ra-accent);
    border-color: var(--ra-accent);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    transition: var(--ra-transition);
}

.btn-ra-primary:hover {
    background: var(--ra-accent-hover);
    border-color: var(--ra-accent-hover);
    color: #fff;
}

.btn-ra-secondary {
    background: var(--ra-bg-hover);
    border-color: var(--ra-border-light);
    color: var(--ra-text);
    font-size: 13px;
    font-weight: 500;
    transition: var(--ra-transition);
}

.btn-ra-secondary:hover {
    background: var(--ra-border-light);
    color: var(--ra-text);
}

/* ============================================================
   FORMULARELEMENTE
   ============================================================ */
.form-control, .form-select {
    background: var(--ra-bg);
    border: 1px solid var(--ra-border-light);
    color: var(--ra-text);
    font-size: 13px;
    border-radius: 4px;
    transition: var(--ra-transition);
}

.form-control:focus, .form-select:focus {
    background: var(--ra-bg);
    border-color: var(--ra-blue);
    color: var(--ra-text);
    box-shadow: 0 0 0 2px rgba(58, 143, 232, 0.2);
    outline: none;
}

.form-control::placeholder { color: var(--ra-text-dim); }

.form-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--ra-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

/* ============================================================
   TABELLEN
   ============================================================ */
.ra-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.ra-table th {
    background: var(--ra-bg-secondary);
    color: var(--ra-text-muted);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--ra-border);
    white-space: nowrap;
}

.ra-table td {
    padding: 7px 12px;
    border-bottom: 1px solid var(--ra-border);
    color: var(--ra-text);
    vertical-align: middle;
}

.ra-table tr:hover td { background: var(--ra-bg-hover); }
.ra-table tr:last-child td { border-bottom: none; }

/* ============================================================
   STATUS BADGES
   ============================================================ */
.ra-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ra-status-playing  { background: rgba(46,204,113,0.15); color: var(--ra-green); }
.ra-status-pending  { background: rgba(122,132,160,0.15); color: var(--ra-text-muted); }
.ra-status-played   { background: rgba(58,143,232,0.15); color: var(--ra-blue); }
.ra-status-warning  { background: rgba(241,196,15,0.15); color: var(--ra-yellow); }
.ra-status-error    { background: rgba(232,58,58,0.15); color: var(--ra-accent); }
.ra-status-skipped  { background: rgba(74,82,112,0.15); color: var(--ra-text-dim); }

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.ra-progress {
    height: 3px;
    background: var(--ra-border);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 4px;
}

.ra-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--ra-accent), var(--ra-accent-hover));
    border-radius: 2px;
    transition: width 1s linear;
}

/* ============================================================
   UTILITIES
   ============================================================ */
.text-muted-ra   { color: var(--ra-text-muted) !important; }
.text-dim-ra     { color: var(--ra-text-dim) !important; }
.text-accent     { color: var(--ra-accent) !important; }
.text-success-ra { color: var(--ra-green) !important; }
.text-warning-ra { color: var(--ra-yellow) !important; }
.text-info-ra    { color: var(--ra-blue) !important; }
.border-ra       { border-color: var(--ra-border) !important; }
.bg-ra-card      { background: var(--ra-bg-card) !important; }
.bg-ra-secondary { background: var(--ra-bg-secondary) !important; }

/* Divider */
.ra-divider {
    border: none;
    border-top: 1px solid var(--ra-border);
    margin: 12px 0;
}

/* Monospace für Zeiten */
.ra-time {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: var(--ra-text);
    letter-spacing: 0.5px;
}

/* Loading Spinner */
.ra-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--ra-border-light);
    border-top-color: var(--ra-accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Tooltip override */
.tooltip-inner {
    background: var(--ra-bg-card);
    border: 1px solid var(--ra-border-light);
    color: var(--ra-text);
    font-size: 12px;
}

/* ============================================================
   DROPDOWN NAVIGATION
   ============================================================ */
.ra-dropdown {
    background: var(--ra-bg-card);
    border: 1px solid var(--ra-border-light);
    border-radius: 6px;
    padding: 4px 0;
    box-shadow: var(--ra-shadow-lg);
    min-width: 200px;
}

.ra-dropdown-item {
    color: var(--ra-text-muted) !important;
    font-size: 13px;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    transition: var(--ra-transition);
}

.ra-dropdown-item:hover {
    background: var(--ra-bg-hover) !important;
    color: var(--ra-text) !important;
}

.ra-dropdown-item.active {
    background: rgba(232,58,58,0.08) !important;
    color: var(--ra-text) !important;
}

/* ============================================================
   BREADCRUMB & SUBNAVIGATION
   ============================================================ */
.ra-breadcrumb {
    background: var(--ra-bg-secondary);
    border-bottom: 1px solid var(--ra-border);
    padding: 6px 16px;
    margin-top: var(--ra-navbar-height);
    .ra-main {margin-top: var(--ra-navbar-height);
    display: flex;
    align-items: center;
    font-size: 12px;
    color: var(--ra-text-muted);
    gap: 6px;
    flex-shrink: 0;
}

.ra-breadcrumb-sep {
    color: var(--ra-text-dim);
}

.ra-breadcrumb-current {
    color: var(--ra-text);
    font-weight: 500;
}

.ra-breadcrumb-subnav {
    margin-left: auto;
    display: flex;
    gap: 2px;
}

.ra-subnav-item {
    color: var(--ra-text-muted);
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 4px;
    text-decoration: none;
    transition: var(--ra-transition);
    display: flex;
    align-items: center;
}

.ra-subnav-item:hover {
    background: var(--ra-bg-hover);
    color: var(--ra-text);
}

.ra-subnav-item.active {
    background: rgba(232,58,58,0.1);
    color: var(--ra-text);
    border-bottom: 2px solid var(--ra-accent);
    border-radius: 4px 4px 0 0;
}

/* Audio Fehlt Zeilen */
.ra-schedule-table tr.is-audio-missing td {
    opacity: 0.5;
}
.ra-schedule-table tr.is-audio-missing td:first-child {
    border-left: 3px solid var(--ra-accent);
    opacity: 1;
}
.ra-schedule-table tr.is-audio-missing:hover td {
    opacity: 0.7;
}
