/**
 * Event Ticket System - Multi-Day Widget CSS
 * Design: Boogiekathi CI
 * - Dunkelrot: #611111
 * - Gold: #D3B574
 * - TT-Club Grün: #008054
 */

/* ===== WIDGET CONTAINER ===== */
.ets-multi-day-widget {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    width: 100%;
    max-width: 100%;
    margin: 30px 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(97, 17, 17, 0.3);
    box-sizing: border-box;
}

/* ===== HEADER ===== */
.ets-mdw-header {
    background: linear-gradient(135deg, #611111 0%, #4a0d0d 100%);
    padding: 25px 20px;
    text-align: center;
}

.ets-mdw-header h3 {
    color: #ffffff;
    font-size: 1.6em;
    margin: 0 0 5px 0;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.ets-mdw-subtitle {
    color: rgba(211, 181, 116, 0.85);
    font-size: 0.95em;
    margin: 0;
}

/* ===== TAGESAUSWAHL ===== */
.ets-mdw-days {
    background: #611111;
    padding: 20px;
}

.ets-mdw-instruction {
    color: #D3B574;
    font-size: 0.9em;
    margin: 0 0 15px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* Container für Tage - Grid Layout */
.ets-mdw-days-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

/* Einzelner Tag */
.ets-mdw-day {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 0;
    cursor: pointer;
    transition: all 0.25s ease;
    flex-direction: row;
    text-align: left;
    gap: 12px;
}

.ets-mdw-day:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(211, 181, 116, 0.3);
}

.ets-mdw-day.sold-out {
    opacity: 0.5;
    cursor: not-allowed;
}

.ets-mdw-day.sold-out:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: transparent;
}

/* Checkbox verstecken */
.ets-mdw-day-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Checkmark - versteckt, da die ganze Karte klickbar ist */
.ets-mdw-day-check {
    display: none !important;
}

.ets-mdw-day-checkbox:checked + .ets-mdw-day-check {
    display: none !important;
}

/* Datum Box */
.ets-mdw-day-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    padding: 10px 12px;
    min-width: 55px;
    flex-shrink: 0;
}

.ets-mdw-day-weekday {
    color: #D3B574;
    font-size: 0.7em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ets-mdw-day-num {
    color: #fff;
    font-size: 1.6em;
    font-weight: 700;
    line-height: 1.2;
}

.ets-mdw-day-month {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.7em;
    text-transform: uppercase;
}

/* Tag Info - neben dem Datum */
.ets-mdw-day-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1;
    min-width: 0;
}

.ets-mdw-day-name {
    color: #fff;
    font-weight: 600;
    font-size: 0.95em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.ets-mdw-day-time {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8em;
}

/* TT-Club Rabatt Hinweis bei Tagen */
.ets-mdw-day-ttclub-hint {
    display: block;
    color: #4CAF93;
    font-size: 0.7em;
    font-weight: 500;
    margin-top: 3px;
    opacity: 0.85;
}

/* Tag mit TT-Club Berechtigung - dezenter grüner Rand */
.ets-mdw-day.tt-club-eligible {
    border-left: 3px solid rgba(0, 128, 84, 0.5);
}

/* Tag Preis - rechts */
.ets-mdw-day-price {
    color: #D3B574;
    font-weight: 700;
    font-size: 1.1em;
    text-align: right;
    flex-shrink: 0;
    margin-left: auto;
}

.ets-mdw-sold-out {
    color: #ff6b6b;
    font-size: 0.85em;
    font-weight: 500;
}

/* Position relative für das ::after Element */
.ets-mdw-day {
    position: relative;
}

/* Aktiver Tag - deutlicher hervorgehoben */
.ets-mdw-day:has(.ets-mdw-day-checkbox:checked),
.ets-mdw-day.selected {
    background: rgba(211, 181, 116, 0.25);
    border-color: #D3B574;
    border-width: 2px;
    box-shadow: 0 2px 10px rgba(211, 181, 116, 0.3);
}

/* Aktiv-Indikator oben rechts */
.ets-mdw-day:has(.ets-mdw-day-checkbox:checked)::after,
.ets-mdw-day.selected::after {
    content: "✓";
    position: absolute;
    top: 6px;
    right: 6px;
    background: #D3B574;
    color: #611111;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
    line-height: 1;
}

/* ===== FESTIVALPASS ===== */
.ets-mdw-festivalpass {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed rgba(211, 181, 116, 0.3);
}

.ets-mdw-festivalpass-option {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(211, 181, 116, 0.2) 0%, rgba(211, 181, 116, 0.1) 100%);
    border: 2px solid #D3B574;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ets-mdw-festivalpass-option:hover {
    background: linear-gradient(135deg, rgba(211, 181, 116, 0.3) 0%, rgba(211, 181, 116, 0.15) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(211, 181, 116, 0.3);
}

.ets-mdw-select-all-checkbox {
    position: absolute;
    opacity: 0;
}

.ets-mdw-festivalpass-icon {
    font-size: 2em;
    margin-right: 12px;
}

.ets-mdw-festivalpass-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ets-mdw-festivalpass-title {
    color: #D3B574;
    font-size: 1.1em;
    font-weight: 700;
}

.ets-mdw-festivalpass-desc {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85em;
}

.ets-mdw-festivalpass-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.ets-mdw-festivalpass-new {
    color: #D3B574;
    font-size: 1.3em;
    font-weight: 700;
}

.ets-mdw-festivalpass-old {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85em;
    text-decoration: line-through;
}

.ets-mdw-festivalpass-save {
    background: #28a745;
    color: #fff;
    font-size: 0.75em;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    margin-top: 3px;
}

.ets-mdw-festivalpass-option.active {
    background: linear-gradient(135deg, rgba(211, 181, 116, 0.4) 0%, rgba(211, 181, 116, 0.25) 100%);
    box-shadow: 0 0 20px rgba(211, 181, 116, 0.4);
}

/* ===== ZUSAMMENFASSUNG ===== */
.ets-mdw-summary {
    background: linear-gradient(180deg, #4a0d0d 0%, #611111 100%);
    padding: 20px;
    border-top: 1px solid rgba(211, 181, 116, 0.2);
}

.ets-mdw-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    color: rgba(255, 255, 255, 0.85);
}

.ets-mdw-no-selection {
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
    padding: 15px 0;
}

.ets-mdw-label {
    font-size: 0.95em;
}

.ets-mdw-value {
    font-weight: 600;
    color: #D3B574;
}

.ets-mdw-total {
    border-top: 1px solid rgba(211, 181, 116, 0.3);
    margin-top: 10px;
    padding-top: 15px;
}

.ets-mdw-total .ets-mdw-label {
    font-size: 1.1em;
    font-weight: 600;
    color: #fff;
}

.ets-mdw-total .ets-mdw-value {
    font-size: 1.4em;
}

.ets-mdw-festivalpass-applied {
    background: rgba(211, 181, 116, 0.15);
    margin: 0 -20px;
    padding: 12px 20px !important;
    border-radius: 0;
}

.ets-mdw-tt-discount .ets-mdw-value {
    color: #28a745;
}

/* Kaufen Button */
.ets-mdw-buy-button {
    width: 100%;
    background: linear-gradient(135deg, #D3B574 0%, #c4a45f 100%);
    color: #611111;
    border: none;
    padding: 16px 20px;
    font-size: 1.1em;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ets-mdw-buy-button:hover:not(:disabled) {
    background: linear-gradient(135deg, #e0c485 0%, #D3B574 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(211, 181, 116, 0.4);
}

.ets-mdw-buy-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.ets-mdw-buy-button:active:not(:disabled) {
    transform: translateY(0);
}

/* ===== TT-CLUB SEKTION ===== */
.ets-mdw-ttclub {
    background: #008054;
    padding: 20px;
}

.ets-mdw-ttclub-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.ets-mdw-ttclub-icon {
    font-size: 1.5em;
    margin-right: 10px;
}

.ets-mdw-ttclub-title {
    color: #fff;
    font-size: 1.1em;
    font-weight: 700;
}

.ets-mdw-ttclub-info {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9em;
    margin: 0 0 15px 0;
}

.ets-mdw-ttclub-input-wrapper {
    position: relative;
}

.ets-mdw-ttclub-input {
    width: 100%;
    padding: 14px 50px 14px 15px;
    border: 2px solid rgba(255, 255, 255, 0.6) !important;
    border-radius: 8px;
    background-color: rgba(0, 60, 40, 0.5) !important;
    color: #fff !important;
    font-size: 1.1em;
    transition: all 0.3s ease;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.ets-mdw-ttclub-input::placeholder {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    opacity: 1 !important;
}

/* Firefox Placeholder */
.ets-mdw-ttclub-input::-moz-placeholder {
    color: rgba(255, 255, 255, 0.9) !important;
    opacity: 1 !important;
}

/* IE/Edge Placeholder */
.ets-mdw-ttclub-input:-ms-input-placeholder {
    color: rgba(255, 255, 255, 0.9) !important;
}

.ets-mdw-ttclub-input:focus {
    outline: none;
    border-color: #fff !important;
    background-color: rgba(0, 80, 50, 0.6) !important;
    color: #fff !important;
}

.ets-mdw-ttclub-input.valid {
    border-color: #90EE90 !important;
    background-color: rgba(0, 100, 60, 0.5) !important;
    color: #fff !important;
}

/* Autofill Fix für Chrome/Safari */
.ets-mdw-ttclub-input:-webkit-autofill,
.ets-mdw-ttclub-input:-webkit-autofill:hover,
.ets-mdw-ttclub-input:-webkit-autofill:focus {
    -webkit-text-fill-color: #fff !important;
    -webkit-box-shadow: 0 0 0px 1000px rgba(0, 80, 50, 0.6) inset !important;
    transition: background-color 5000s ease-in-out 0s;
    border-color: #fff !important;
}

.ets-mdw-ttclub-status {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.3em;
}

.ets-mdw-ttclub-status.valid::after {
    content: "✓";
    color: #90EE90;
}

.ets-mdw-ttclub-status.checking::after {
    content: "...";
    color: rgba(255, 255, 255, 0.5);
}

.ets-mdw-ttclub-hint {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8em;
    margin: 10px 0 0 0;
    text-align: center;
}

/* ===== TT-CLUB FORTSCHRITTSBALKEN ===== */
.ets-mdw-ttclub-progress {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 15px;
}

.ets-mdw-ttclub-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.ets-mdw-ttclub-progress-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ets-mdw-ttclub-progress-count {
    color: #fff;
    font-weight: 700;
    font-size: 0.95em;
}

.ets-mdw-ttclub-progress-bar {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    height: 12px;
    overflow: hidden;
    position: relative;
}

.ets-mdw-ttclub-progress-fill {
    background: linear-gradient(90deg, #90EE90 0%, #32CD32 50%, #228B22 100%);
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
    position: relative;
}

/* Warnung bei >= 80% */
.ets-mdw-ttclub-progress-fill.warning {
    background: linear-gradient(90deg, #ffc107 0%, #ff9800 100%);
}

/* Kritisch bei >= 95% */
.ets-mdw-ttclub-progress-fill.critical {
    background: linear-gradient(90deg, #ff6b6b 0%, #dc3545 100%);
    animation: pulse-progress 1.5s infinite;
}

@keyframes pulse-progress {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.ets-mdw-ttclub-progress-remaining {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8em;
    margin: 8px 0 0 0;
    text-align: center;
}

/* ===== TT-CLUB LIMIT ERREICHT ===== */
.ets-mdw-ttclub.limit-reached {
    background: linear-gradient(135deg, #666 0%, #444 100%);
    opacity: 0.9;
}

.ets-mdw-ttclub-limit-reached {
    text-align: center;
    padding: 15px;
}

.ets-mdw-ttclub-limit-message {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95em;
    margin: 0;
    padding: 15px;
    background: rgba(220, 53, 69, 0.2);
    border: 1px dashed rgba(220, 53, 69, 0.5);
    border-radius: 8px;
}

.ets-mdw-ttclub-limit-message::before {
    content: "⚠️ ";
}

/* ===== RESPONSIVE ===== */

/* Tablet und Desktop - Tage nebeneinander im Grid */
@media screen and (min-width: 481px) {
    .ets-mdw-days-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    
    .ets-mdw-day {
        min-height: auto;
        justify-content: flex-start;
    }
}

/* Mobile - Tage untereinander */
@media screen and (max-width: 480px) {
    .ets-multi-day-widget {
        margin: 15px 0;
        border-radius: 10px;
    }
    
    .ets-mdw-header {
        padding: 20px 15px;
    }
    
    .ets-mdw-header h3 {
        font-size: 1.2em;
    }
    
    .ets-mdw-days {
        padding: 15px;
    }
    
    /* Auf Mobile: Tage untereinander */
    .ets-mdw-days-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .ets-mdw-day {
        flex-direction: row;
        text-align: left;
        padding: 12px;
        min-height: auto;
        gap: 10px;
    }
    
    .ets-mdw-day-date {
        min-width: 48px;
        padding: 8px 10px;
    }
    
    .ets-mdw-day-num {
        font-size: 1.3em;
    }
    
    .ets-mdw-day-weekday,
    .ets-mdw-day-month {
        font-size: 0.65em;
    }
    
    .ets-mdw-day-info {
        flex: 1;
        align-items: flex-start;
    }
    
    .ets-mdw-day-name {
        font-size: 0.9em;
    }
    
    .ets-mdw-day-time {
        font-size: 0.75em;
    }
    
    .ets-mdw-day-price {
        text-align: right;
        font-size: 1em;
    }
    
    .ets-mdw-festivalpass-option {
        padding: 12px;
    }
    
    .ets-mdw-festivalpass-icon {
        font-size: 1.5em;
    }
    
    .ets-mdw-summary {
        padding: 15px;
    }
    
    .ets-mdw-buy-button {
        padding: 14px 15px;
        font-size: 1em;
    }
    
    .ets-mdw-ttclub {
        padding: 15px;
    }
}

/* ===== ANIMATIONEN ===== */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.ets-mdw-buy-button.loading {
    animation: pulse 1s infinite;
    pointer-events: none;
}

/* ===== DUNKELMODUS KOMPATIBILITÄT ===== */
@media (prefers-color-scheme: dark) {
    .ets-multi-day-widget {
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    }
}


