/**
 * Dialog-Styles - Dual Theme Design
 * Weihnachtliches Design (Standard) / Lions Design
 */

/* Overlay */
.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.dialog-overlay.visible {
    opacity: 1;
    visibility: visible;
}

/* Dialog - Liquid Glass Style */
.dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    max-width: 420px;
    width: 90%;
    max-height: 80vh;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;

    /* Liquid Glass Effekt */
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.95) 0%,
        rgba(255, 255, 255, 0.85) 100%
    );
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.dialog.visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* ========================================
   Dialog Header - Christmas Theme (Default)
   ======================================== */
.dialog-header {
    background: linear-gradient(135deg, #c41e3a 0%, #8b0000 100%);
    color: white;
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    border-radius: 24px 24px 0 0;
}

.dialog-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dialog-close {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.dialog-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.dialog-close:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Dialog Content */
.dialog-content {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
}

/* Ladeindikator - Christmas Theme (Default) */
.dialog-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 15px;
}

.dialog-loading::before {
    content: '';
    display: block;
    width: 36px;
    height: 36px;
    margin: 0 auto 15px;
    border: 3px solid #c41e3a;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Nachrichten */
.dialog-message {
    text-align: center;
    padding: 24px 20px;
    color: #555;
}

.dialog-message p {
    margin: 8px 0;
    line-height: 1.5;
}

.dialog-message .message-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

/* Fehler */
.dialog-error {
    text-align: center;
    padding: 24px 20px;
    color: #c62828;
}

.dialog-error .error-details {
    font-size: 12px;
    color: #999;
    margin-top: 10px;
}

/* Gewinner-Liste (Card-Style mit Liquid Glass) */
.winners-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.winner-item {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.8) 0%,
        rgba(245, 245, 245, 0.9) 100%
    );
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 14px;
    padding: 14px 16px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    gap: 14px;
}

.winner-item:hover {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.95) 0%,
        rgba(250, 250, 250, 1) 100%
    );
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Winner Number Badge - Christmas Theme (Default) */
.winner-number {
    flex-shrink: 0;
    min-width: 60px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #c41e3a 0%, #8b0000 100%);
    color: white;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(196, 30, 58, 0.3);
}

.winner-details {
    flex: 1;
    min-width: 0;
}

.winner-prize {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    line-height: 1.3;
}

.winner-sponsor {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

/* Info-Box */
.dialog-info {
    margin-top: 16px;
    padding: 14px 16px;
    background: linear-gradient(
        135deg,
        rgba(227, 242, 253, 0.8) 0%,
        rgba(187, 222, 251, 0.6) 100%
    );
    border: 1px solid rgba(21, 101, 192, 0.15);
    border-radius: 12px;
    font-size: 13px;
    color: #1565c0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.5;
}

.dialog-info::before {
    content: 'i';
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    background: #1565c0;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    font-style: italic;
    font-family: Georgia, serif;
}

/* Alte Tabellen-Styles für Kompatibilität - Christmas Theme */
.winners-table {
    width: 100%;
    border-collapse: collapse;
}

.winners-table th,
.winners-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.winners-table th {
    background: linear-gradient(135deg, #c41e3a 0%, #8b0000 100%);
    color: white;
    font-weight: 600;
}

.winners-table tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.winners-table .winner-number {
    font-weight: bold;
    white-space: nowrap;
}

.winners-table .winner-prize {
    color: #333;
}

.winners-table .winner-sponsor {
    color: #666;
    font-size: 0.9em;
}

/* ========================================
   Lions Theme Overrides
   ======================================== */
body.theme-lions .dialog-header {
    background: linear-gradient(135deg, #003366 0%, #004080 100%);
}

body.theme-lions .dialog-loading::before {
    border-color: #003366;
    border-top-color: transparent;
}

body.theme-lions .winner-number {
    background: linear-gradient(135deg, #003366 0%, #004080 100%);
    box-shadow: 0 2px 6px rgba(0, 51, 102, 0.3);
}

body.theme-lions .winners-table th {
    background: linear-gradient(135deg, #003366 0%, #004080 100%);
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 600px) {
    .dialog {
        width: 95%;
        max-height: 90vh;
        border-radius: 20px;
    }

    .dialog-header {
        padding: 16px 18px;
        border-radius: 20px 20px 0 0;
    }

    .dialog-title {
        font-size: 1rem;
    }

    .dialog-content {
        padding: 16px;
    }

    .winner-item {
        padding: 12px 14px;
        border-radius: 12px;
    }

    .winners-table th,
    .winners-table td {
        padding: 8px;
        font-size: 14px;
    }
}
