@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700&family=Cormorant+Garamond:ital,wght@0,300;0,400;1,300;1,400&display=swap');

.mwf-wheel-of-year-container {
    margin: 2rem auto;
    padding: 2rem;
    background: transparent;
    border-radius: 8px;
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mwf-wheel-of-year-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: none;
    pointer-events: none;
    opacity: 0;
    border-radius: 8px;
}

.mwf-wheel-of-year-container svg {
    width: 96%;
    height: 96%;
    filter: drop-shadow(0 0 40px rgba(180,120,40,0.3));
    position: relative;
    z-index: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .mwf-wheel-of-year-container {
        padding: 0;
        margin: 1rem auto;
        width: 98vw; /* Slightly less than 100vw to allow for some breathing room and avoid scrollbars */
        max-width: 98vw !important;
        position: relative;
        left: 50%;
        margin-left: -49vw; /* Half of 98vw */
        aspect-ratio: 1 / 1;
    }

    .mwf-wheel-of-year-container svg {
        width: 100%;
        height: 100%;
        filter: drop-shadow(0 0 10px rgba(180,120,40,0.3));
    }
}

/* Modal Styles */
.wheel-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 90px 20px 20px 20px;
    box-sizing: border-box;
}

/* Left-aligned modal for festivals */
.wheel-modal.modal-left {
    justify-content: flex-start;
    padding-left: 40px;
}

.wheel-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.wheel-modal-content {
    position: relative;
    background: #213b2e;
    border: 2px solid #d4af37;
    border-radius: 8px;
    max-width: 700px;
    width: 90%;
    height: calc(100vh - 110px);
    max-height: calc(100vh - 110px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 0 40px rgba(212, 175, 55, 0.4);
    z-index: 10001;
}

.wheel-modal-close {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #213b2e;
    border: 2px solid #d4af37;
    border-radius: 50%;
    color: #d4af37;
    font-size: 30px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, color 0.2s ease;
    z-index: 10005;
    -webkit-tap-highlight-color: transparent;
}

.wheel-modal-close:hover {
    color: #FFD700;
    transform: scale(1.2);
}

.wheel-modal-body {
    padding: 25px;
    color: #ffffff;
    overflow-y: auto; /* NEW: Content scrolls inside here! */
    flex: 1; /* NEW: Take up all space below logo */
}

.wheel-modal-logo {
    position: absolute;
    top: 40px;
    left: 40px;
    width: 80px;
    height: 80px;
    opacity: 0.9;
}

.wheel-modal-body h2 {
    font-family: 'Cinzel Decorative', serif;
    color: #d4af37;
    margin: 0 0 30px 0;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(212, 175, 55, 0.3);
    text-align: center;
    line-height: 1.4;
}

.modal-main-title {
    font-size: 32px;
    font-weight: 700;
    display: block;
}

.modal-subtitle {
    font-size: 20px;
    font-weight: 400;
    font-style: italic;
    color: #c9922a;
    display: block;
    margin-top: 8px;
}

.modal-section {
    margin-bottom: 25px;
}

.modal-section h3 {
    font-family: 'Cinzel Decorative', serif;
    color: #FFD700;
    font-size: 18px;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.modal-section p {
    font-family: 'Cormorant Garamond', serif;
    font-size: 16px;
    line-height: 1.7;
    margin: 0;
    color: #e8e8e8;
}

.modal-attribution {
    font-size: 12px;
    color: #c9922a;
    font-style: italic;
    margin-bottom: 20px;
    padding: 10px;
    background: rgba(212, 175, 55, 0.1);
    border-left: 2px solid #c9922a;
    line-height: 1.5;
}

.modal-themes-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.modal-themes-list li {
    font-family: 'Cormorant Garamond', serif;
    font-size: 15px;
    color: #e8e8e8;
    padding: 6px 0 6px 20px;
    position: relative;
    line-height: 1.5;
}

.modal-themes-list li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #FFD700;
    font-weight: bold;
}

/* Mobile modal adjustments */
@media (max-width: 1024px) {
    .wheel-modal.modal-left {
        justify-content: center;
        padding-left: 20px;
    }
}

@media (max-width: 768px) {
    .wheel-modal {
        padding: 70px 12px 12px 12px;
        align-items: center;
    }

    .wheel-modal-content {
        width: 100%;
        max-width: 100%;
        height: calc(100vh - 84px);
        max-height: calc(100vh - 84px);
        border-radius: 6px;
    }
    
    .wheel-modal-body {
        padding: 20px 16px;
    }
    
    .wheel-modal-logo {
        display: none;
    }
    
    .modal-main-title {
        font-size: 22px;
    }
    
    .modal-subtitle {
        font-size: 15px;
    }
    
    .modal-section h3 {
        font-size: 15px;
    }
    
    .modal-section p {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .wheel-modal {
        padding: 60px 8px 8px 8px;
    }

    .wheel-modal-content {
        height: calc(100vh - 68px);
        max-height: calc(100vh - 68px);
        border-radius: 4px;
    }

    .modal-main-title {
        font-size: 19px;
    }

    .modal-subtitle {
        font-size: 14px;
    }

    .wheel-modal-close {
        width: 38px;
        height: 38px;
        font-size: 24px;
    }
}
