/*
 * BX Advent Calendar - Base Styles
 * Grid-Layout, Modal und Grundstruktur (Theme-unabhängig)
 */

/* ============================================================
   GRID LAYOUT
   ============================================================ */
.advent-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
    margin: 30px auto;
    max-width: 1200px;
    padding: 20px;
    border-radius: 8px;
    position: relative;
}

@media (max-width: 1024px) {
    .advent-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }
}

@media (max-width: 768px) {
    .advent-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .advent-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 10px;
    }
}

/* ============================================================
   TÜRCHEN BASE
   ============================================================ */
.advent-door {
    aspect-ratio: 1;
    position: relative;
    transition: all 0.3s ease;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.advent-door:not(.locked):not(.empty):hover {
    transform: translateY(-5px) scale(1.05);
}

/* Gesperrte Türchen */
.advent-door.locked {
    cursor: not-allowed;
    opacity: 0.5;
    filter: grayscale(50%);
}

/* Leere Türchen */
.advent-door.empty {
    cursor: not-allowed;
    opacity: 0.6;
} 

/* ============================================================
   TÜRCHEN CONTENT
   ============================================================ */
.advent-door-front {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.advent-door-number {
    font-size: 2.5rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.advent-door-lock {
    font-size: 1.5rem;
    margin-top: 5px;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
}

.advent-door-back {
    width: 100%;
    height: 100%;
    padding: 10px;
    overflow-y: auto;
}

/* ============================================================
   COUNTDOWN
   ============================================================ */
.advent-countdown {
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    margin: 20px auto;
    max-width: 1200px;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 10px;
}

#countdownText {
    margin: 0;
    letter-spacing: 1px;
}

/* ============================================================
   MODAL
   ============================================================ */
.advent-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.advent-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(3px);
}

.advent-modal-content {
    position: relative;
    width: 90%;
    max-width: 650px;
    max-height: 85vh;
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    animation: modalAnimation 0.7s ease;
    z-index: 1;
}

@keyframes modalAnimation { 
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.advent-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #333;
    color: #fff;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.advent-modal-close:hover {
    background: #000;
    transform: rotate(90deg);
}

#modalTitle {
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ddd;
}

#modalContent {
    margin-top: 15px;
    font-size: 1rem;
    line-height: 1.6;
}

#modalContent img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 15px 0;
}

#modalContent .button,
#modalContent a.button {
    display: inline-block;
    padding: 10px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 15px;
    transition: all 0.3s;
}

/* ============================================================
   GUTSCHEIN BOX
   ============================================================ */
#modalContent .coupon-box {
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin: 15px 0;
}

#modalContent .coupon-code {
    font-size: 1.8rem;
    font-weight: bold;
    margin: 10px 0;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
}

/* ============================================================
   PRODUKT DARSTELLUNG
   ============================================================ */
#modalContent .advent-product {
    text-align: center;
}

#modalContent .advent-product img {
    max-width: 200px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

#modalContent .advent-product h1 {
    font-size: 1.5rem;
    margin: 15px 0;
    color: #333;
}

#modalContent .advent-price-box {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe5e5 100%);
    border: 2px solid #e53e3e;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

#modalContent .product-description {
    margin-top: 15px;
    text-align: left;
    line-height: 1.6;
}

#modalContent .advent-text {
    line-height: 1.8;
}

#modalContent .advent-text p {
    margin-bottom: 15px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .advent-door-number {
        font-size: 2rem;
    }
    
    .advent-modal-content {
        padding: 20px;
        width: 95%;
    }
    
    #modalTitle {
        font-size: 1.5rem;
    }
    
    #modalContent {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .advent-door-number {
        font-size: 1.5rem;
    }
    
    .advent-door-lock {
        font-size: 1.2rem;
    }
    
    .advent-countdown {
        font-size: 1rem;
        padding: 15px;
    }
}
