/* assets/css/wochenplan.css */

/* ==========================================================================
   WICHTIGER HINWEIS:
   Diese Datei enthält die GRUNDLEGENDE STRUKTUR und das Basis-Layout.
   Die Design-Einstellungen (Farben, Abstände etc.), die du im Admin-Panel
   festlegst, werden von deiner PHP-Funktion 'sendeplan_generate_dynamic_css'
   geladen und überschreiben die Regeln hier wo nötig.
   So bleibt die Funktion erhalten und dein Design wird trotzdem angewendet.
   ========================================================================== */

/* ==========================================================================
   ALLGEMEINES FRONTEND-LAYOUT & CONTAINER
   ========================================================================== */
.sendeplan-container {
    box-sizing: border-box;
}

/* Basis für alle Listen-Items (Tabs, Accordion) */
.sendeplan-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sendeplan-show-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease;
}
.sendeplan-show-item:last-child {
    border-bottom: none;
}
.sendeplan-show-item:not(.autodj):hover {
    background-color: #f9f9f9;
}
.sendeplan-show-item.autodj {
    background-color: #fafafa;
    color: #888;
}
.sendeplan-dj-image {
    flex-shrink: 0;
}
.sendeplan-dj-image img {
    display: block;
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 50%;
}
.sendeplan-show-details {
    flex-grow: 1;
}
.sendeplan-show-time, .sendeplan-show-dj {
    font-size: 0.9em;
    color: #555;
}
.sendeplan-show-title {
    font-size: 1.1em;
    font-weight: bold;
    margin: 4px 0;
}
.sendeplan-details-btn {
    padding: 8px 15px;
    border: 1px solid #ccc;
    background-color: #f7f7f7;
    color: #333;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.sendeplan-details-btn:hover {
    background-color: #e9e9e9;
}
.sendeplan-show-details p,
.sendeplan-show-details h4 {
    margin-top: 0;
    margin-bottom: 4px;
    line-height: 1;
}

.sendeplan-show-details > *:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   TABS-ANSICHT (STRUKTUR)
   ========================================================================== */
.sendeplan-tabs {
    display: flex;
    flex-wrap: wrap;
}
.sendeplan-tab-link {
    padding: 10px 15px;
    cursor: pointer;
    border: none;
    background-color: #f1f1f1;
    border-bottom: 3px solid transparent;
    transition: background-color 0.2s, border-color 0.2s;
    flex: 1;
    text-align: center;
    margin: 0px 2px 0px 2px !important;
}
.sendeplan-tab-link .day-name {
    font-weight: bold;
}
.sendeplan-tab-link .day-date {
    font-size: 0.9em;
    display: block;
    margin-top: 2px;
}
.sendeplan-tab-link.active {
    background-color: #fff;
    border-bottom-color: #0073aa;
    margin: 0px 2px 0px 2px !important;
}
.sendeplan-tab-content {
    display: none; /* Wichtig: Inhalte sind standardmäßig versteckt */
    border: 1px solid #ccc;
    border-top: none;
    padding: 10px;
}
.sendeplan-tab-content.active {
    display: block; /* Nur der aktive Tab-Inhalt wird angezeigt */
}


/* ==========================================================================
   ACCORDION-ANSICHT (STRUKTUR)
   ========================================================================== */
.sendeplan-accordion-item {
    border-bottom: 1px solid #ddd;
}
.sendeplan-accordion-item:first-of-type {
    border-top: 1px solid #ddd;
}
.sendeplan-accordion-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    cursor: pointer;
    background-color: #f9f9f9;
    transition: background-color 0.2s ease;
}
.sendeplan-accordion-title:hover {
    background-color: #f1f1f1;
}
.sendeplan-accordion-title .toggle-indicator {
    font-size: 1.5em;
    font-weight: bold;
    transition: transform 0.3s ease;
}
.sendeplan-accordion-item.active .sendeplan-accordion-title .toggle-indicator {
    transform: rotate(45deg); /* Macht aus dem + ein x */
}
.sendeplan-accordion-content {
    display: none; /* Wichtig: Inhalte sind standardmäßig versteckt */
    padding: 0;
    background-color: #fff;
}


/* ==========================================================================
   GRID-ANSICHT (STRUKTUR)
   ========================================================================== */
.sendeplan-grid-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}
.sendeplan-grid-table th, .sendeplan-grid-table td {
    border: 1px solid #ddd;
    text-align: center;
    vertical-align: top;
    padding: 5px;
}
.sendeplan-grid-table th {
    padding: 10px 5px;
    background-color: #f7f7f7;
}
.sendeplan-time-col {
    width: 80px;
    font-weight: bold;
    background-color: #f9f9f9;
    vertical-align: middle;
}
.sendeplan-grid-cell {
    height: 100px;
}
.sendeplan-grid-show-item {
    padding: 8px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    box-sizing: border-box;
    cursor: pointer;
}
.sendeplan-grid-show-item.autodj {
    color: #999;
    cursor: default;
}
.sendeplan-grid-dj-image img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}
.sendeplan-grid-dj-name {
    font-weight: 500;
    font-size: 13px;
    text-align: center;
}
.sendeplan-grid-details-btn {
    font-size: 11px;
    padding: 3px 8px;
    margin-top: auto;
}


/* ==========================================================================
   MODAL-FENSTER (FRONTEND) - KORRIGIERT MIT ANIMATION
   ========================================================================== */
.sendeplan-modal-overlay {
    visibility: hidden;
    opacity: 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 100100;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    transition: opacity 0.3s, visibility 0.3s;
}
.sendeplan-modal-overlay.active {
    visibility: visible;
    opacity: 1;
}
.sendeplan-modal-content {
    background: #fff;
    padding: 25px;
    border-radius: 5px;
    max-width: 600px;
    width: 100%;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transform: scale(0.95);
    transition: transform 0.3s;
}

.sendeplan-modal-overlay.active .sendeplan-modal-content {
    transform: scale(1);
}
.sendeplan-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-size: 28px;
    font-weight: bold;
    color: #888;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.sendeplan-modal-close:hover {
    color: #333;
}
#sendeplan-modal-title {
    margin-top: 0;
    margin-bottom: 5px;
}
#sendeplan-modal-meta {
    margin-top: 0;
    margin-bottom: 20px;
    font-style: italic;
    color: #555;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}
#sendeplan-modal-body {
    max-height: 60vh;
    overflow-y: auto;
}
#sendeplan-modal-body p:first-child {
    margin-top: 0;
}
.sendeplan-modal-button {
    display: inline-block;
    text-decoration: none;
    font-weight: bold;
    text-align: center;
    border-style: solid;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* ==========================================================================
   AKTUELLE SENDUNG WIDGET
   ========================================================================== */
/* Sehr spezifische Selektoren */
.widget.widget_lautbox_sendeplan_online_widget .lautbox-current-show {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    padding: 15px !important;
    background-color: #f9f9f9 !important;
    border: 1px solid #eee !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05) !important;
}

.widget.widget_lautbox_sendeplan_online_widget .lautbox-current-show__image {
    flex-shrink: 0 !important;
}

.widget.widget_lautbox_sendeplan_online_widget .lautbox-current-show__image img {
    width: 80px !important;
    height: 80px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    display: block !important;
    border: 3px solid #0073aa !important;
}

.widget.widget_lautbox_sendeplan_online_widget .lautbox-current-show__details {
    flex-grow: 1 !important;
    min-width: 0 !important;
}

.widget.widget_lautbox_sendeplan_online_widget .lautbox-current-show__title {
    font-size: 1.1em !important;
    font-weight: bold !important;
    margin: 0 0 5px 0 !important;
    color: #333 !important;
    line-height: 1.3 !important;
}

.widget.widget_lautbox_sendeplan_online_widget .lautbox-current-show__dj {
    font-size: 0.9em !important;
    color: #555 !important;
    margin: 0 0 3px 0 !important;
}

.widget.widget_lautbox_sendeplan_online_widget .lautbox-current-show__time {
    font-size: 0.85em !important;
    color: #777 !important;
    margin: 0 !important;
    font-style: italic !important;
}

.widget.widget_lautbox_sendeplan_online_widget .lautbox-current-show--autodj {
    background-color: #f0f0f0 !important;
    border-color: #ddd !important;
}

.widget.widget_lautbox_sendeplan_online_widget .lautbox-current-show--autodj .lautbox-current-show__image img {
    border-color: #888 !important;
}
