/* Ethiopian Calendar Styles - Completely Isolated */
#ethiopian-calendar-container {
    --ec-coffee-clay: #6B4C3B;
    --ec-mesob-yellow: #F2C94C;
    --ec-teff-green: #7D9A3E;
    --ec-injera-beige: #E8D8C3;
    --ec-orthodox-silver: #B0B0B0;
    --ec-darker-green: #5a7a1e;
    --ec-darker-red: #a02a1d;
    
    width: 100%;
    max-width: 900px;
    background: var(--ec-coffee-clay);
    border-radius: 20px;
    box-shadow: 
        0 15px 30px rgba(0, 0, 0, 0.25),
        0 10px 20px rgba(0, 0, 0, 0.22),
        inset 0 -5px 15px rgba(255, 255, 255, 0.2);
    overflow: hidden;
    border: 5px solid var(--ec-mesob-yellow);
    margin: 0 auto;
    /* Tilt effect completely removed */
    transform: none !important;
}

#ethiopian-calendar-container .header-banner {
    background: linear-gradient(90deg, #5a3c2c, var(--ec-teff-green)) !important;
    padding: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 3px solid var(--ec-orthodox-silver);
}

#ethiopian-calendar-container .header-banner::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M0,0 Q50,20 100,0 L100,100 Q50,80 0,100 Z" fill="rgba(255,255,255,0.2)"/></svg>');
    background-size: cover;
}

#ethiopian-calendar-container .header-banner h1 {
    font-family: 'Nunito', sans-serif;
    font-size: 2.5rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

#ethiopian-calendar-container .header-banner p {
    font-size: 1.2rem;
    color: white;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

#ethiopian-calendar-container .ec-inner {
    padding: 25px;
    background: var(--ec-injera-beige);
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="%23E8D8C3"/><path d="M0,0 Q50,20 100,0 L100,100 Q50,80 0,100 Z" fill="rgba(123,154,62,0.05)"/></svg>');
    background-size: 200px;
}

#ethiopian-calendar-container .calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    gap: 15px;
    flex-wrap: wrap;
}

#ethiopian-calendar-container .nav-btn {
    background: linear-gradient(to bottom, var(--ec-teff-green), #6b8e23);
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 
        0 5px 15px rgba(0, 0, 0, 0.2),
        0 3px 8px rgba(123, 154, 62, 0.5);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 8px;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
    min-width: 150px;
    justify-content: center;
    border: 2px solid var(--ec-orthodox-silver);
}

#ethiopian-calendar-container .nav-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: 0.5s;
}

#ethiopian-calendar-container .nav-btn:hover::before {
    left: 100%;
}

#ethiopian-calendar-container .nav-btn:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.25),
        0 5px 12px rgba(123, 154, 62, 0.6);
    background: linear-gradient(to bottom, #8db446, #7D9A3E);
}

#ethiopian-calendar-container .nav-btn:active {
    transform: translateY(1px);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.2),
        0 1px 4px rgba(123, 154, 62, 0.5);
}

#ethiopian-calendar-container .nav-btn:focus {
    outline: none;
}

#ethiopian-calendar-container #current-month-display {
    background: linear-gradient(135deg, var(--ec-teff-green), var(--ec-coffee-clay));
    color: white;
    padding: 12px 25px;
    border-radius: 12px;
    font-size: 1.4rem;
    font-weight: 800;
    text-align: center;
    box-shadow: 
        0 5px 15px rgba(0, 0, 0, 0.15),
        inset 0 -3px 8px rgba(0, 0, 0, 0.2);
    flex: 1;
    min-width: 250px;
    text-shadow: 0 2px 3px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid var(--ec-orthodox-silver);
}

#ethiopian-calendar-container #current-month-display:hover {
    transform: scale(1.03);
    box-shadow: 
        0 7px 20px rgba(0, 0, 0, 0.2),
        inset 0 -3px 10px rgba(0, 0, 0, 0.3);
}

#ethiopian-calendar-container #current-dates {
    background: linear-gradient(to right, #5a3c2c, var(--ec-teff-green)) !important;
    color: white;
    padding: 12px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 10px;
    border: 2px solid var(--ec-orthodox-silver);
}

#ethiopian-calendar-container .date-section {
    padding: 8px 15px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.2);
    min-width: 200px;
}

#ethiopian-calendar-container #weekdays-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 15px;
}

#ethiopian-calendar-container .weekday-cell {
    background: linear-gradient(to bottom, var(--ec-coffee-clay), #5a3c2c);
    color: var(--ec-mesob-yellow) !important;
    padding: 12px 5px;
    border-radius: 12px;
    font-size: 1.1rem;
    text-align: center;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.15),
        inset 0 -3px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.7) !important;
    border: 2px solid var(--ec-orthodox-silver);
}

#ethiopian-calendar-container .weekday-cell:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 6px 12px rgba(0, 0, 0, 0.2),
        inset 0 -3px 8px rgba(0, 0, 0, 0.3);
    background: linear-gradient(to bottom, #7c5a48, var(--ec-coffee-clay));
}

#ethiopian-calendar-container .weekday-cell:active {
    transform: translateY(1px);
}

#ethiopian-calendar-container .calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 25px;
}

#ethiopian-calendar-container .day {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    box-sizing: border-box;
    background: linear-gradient(145deg, #ffffff, #e6e6e6);
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.1),
        inset 0 -3px 6px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid var(--ec-orthodox-silver);
}

#ethiopian-calendar-container .day::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 60%, rgba(0, 0, 0, 0.05) 100%);
    transition: all 0.3s ease;
}

#ethiopian-calendar-container .day.empty {
    background: transparent;
    box-shadow: none;
    border: none;
}

#ethiopian-calendar-container .day .day-number {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
    border-radius: 12px;
}

#ethiopian-calendar-container .geez-num {
    font-size: 2.2rem;
    font-weight: bold;
    color: var(--ec-coffee-clay);
    text-align: center;
    line-height: 1;
    margin-top: 5px;
    transition: all 0.3s ease;
}

#ethiopian-calendar-container .western-num {
    position: absolute;
    bottom: 5px;
    right: 8px;
    font-size: 0.9rem;
    color: var(--ec-coffee-clay);
    opacity: 0.8;
    transition: all 0.3s ease;
}

/* Enhanced hover and active states */
#ethiopian-calendar-container .day .day-number:hover,
#ethiopian-calendar-container .day .day-number.active {
    background: var(--ec-coffee-clay);
}

#ethiopian-calendar-container .day .day-number:hover .geez-num,
#ethiopian-calendar-container .day .day-number.active .geez-num,
#ethiopian-calendar-container .day .day-number:hover .western-num,
#ethiopian-calendar-container .day .day-number.active .western-num {
    color: #FFFFFF !important;
    text-shadow: none;
    opacity: 1;
}

/* Active state should maintain hover appearance */
#ethiopian-calendar-container .day .day-number:active,
#ethiopian-calendar-container .day .day-number:focus {
    background: var(--ec-coffee-clay);
}

#ethiopian-calendar-container .day .day-number:active .geez-num,
#ethiopian-calendar-container .day .day-number:focus .geez-num,
#ethiopian-calendar-container .day .day-number:active .western-num,
#ethiopian-calendar-container .day .day-number:focus .western-num {
    color: #FFFFFF !important;
    text-shadow: none;
    opacity: 1;
}

/* Special states */
#ethiopian-calendar-container .day.holiday .geez-num {
    color: #c0392b;
}

#ethiopian-calendar-container .day.holiday .day-number:hover .geez-num,
#ethiopian-calendar-container .day.holiday .day-number.active .geez-num,
#ethiopian-calendar-container .day.holiday .day-number:active .geez-num,
#ethiopian-calendar-container .day.holiday .day-number:focus .geez-num {
    color: #FFFFFF !important;
}

#ethiopian-calendar-container .day.today .geez-num {
    color: var(--ec-teff-green);
    text-shadow: 0 0 5px rgba(123, 154, 62, 0.5);
    animation: ec-pulse 2s infinite;
}

#ethiopian-calendar-container .day.today .day-number:hover .geez-num,
#ethiopian-calendar-container .day.today .day-number.active .geez-num,
#ethiopian-calendar-container .day.today .day-number:active .geez-num,
#ethiopian-calendar-container .day.today .day-number:focus .geez-num {
    color: #FFFFFF !important;
    text-shadow: none;
    animation: none;
}

@keyframes ec-pulse {
    0% { text-shadow: 0 0 5px rgba(123, 154, 62, 0.5); }
    50% { text-shadow: 0 0 15px rgba(123, 154, 62, 0.8); }
    100% { text-shadow: 0 0 5px rgba(123, 154, 62, 0.5); }
}

#ethiopian-calendar-container #holiday-notes-container {
    background: linear-gradient(135deg, var(--ec-coffee-clay), #5a3c2c);
    border-radius: 15px;
    padding: 20px;
    color: var(--ec-mesob-yellow);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border: 2px solid var(--ec-orthodox-silver);
}

#ethiopian-calendar-container #holiday-notes-container h4 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

#ethiopian-calendar-container #holiday-notes-container ul {
    list-style: none;
    padding: 0;
}

#ethiopian-calendar-container #holiday-notes-container li {
    background: rgba(232, 216, 195, 0.2);
    margin-bottom: 12px;
    padding: 15px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#ethiopian-calendar-container .holiday-name {
    font-weight: 700;
    font-size: 1.1rem;
}

#ethiopian-calendar-container .audio-btn {
    background: linear-gradient(to right, var(--ec-mesob-yellow), #d4ac2b);
    color: var(--ec-coffee-clay);
    border: none;
    padding: 8px 15px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    border: 2px solid var(--ec-orthodox-silver);
}

#ethiopian-calendar-container .audio-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.3);
    background: linear-gradient(to right, #f8d76c, var(--ec-mesob-yellow));
}

#ethiopian-calendar-container .holiday-popup {
    position: absolute;
    z-index: 100;
    background: var(--ec-injera-beige);
    border-radius: 15px;
    padding: 20px;
    width: 250px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 3px solid var(--ec-mesob-yellow);
    transform: translateY(10px);
    animation: ec-popIn 0.3s ease-out;
}

@keyframes ec-popIn {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(10px); }
}

#ethiopian-calendar-container .holiday-popup:before {
    content: "";
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 10px 10px;
    border-style: solid;
    border-color: transparent transparent var(--ec-mesob-yellow) transparent;
}

#ethiopian-calendar-container .popup-content h4 {
    color: var(--ec-coffee-clay);
    margin-bottom: 10px;
    font-size: 1.3rem;
}

#ethiopian-calendar-container .popup-content p {
    color: var(--ec-teff-green);
    margin-bottom: 15px;
}

#ethiopian-calendar-container .copyright-note {
    text-align: center;
    color: var(--ec-mesob-yellow);
    margin-top: 25px;
    font-size: 0.9rem;
    padding: 10px;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
    width: 100%;
}

@media (max-width: 768px) {
    #ethiopian-calendar-container .calendar-header {
        flex-direction: column;
    }
    
    #ethiopian-calendar-container .nav-btn, 
    #ethiopian-calendar-container #current-month-display {
        width: 100%;
    }
    
    #ethiopian-calendar-container #weekdays-header {
        grid-template-columns: repeat(7, 1fr);
        font-size: 0.9rem;
    }
    
    #ethiopian-calendar-container .weekday-cell {
        padding: 8px 2px;
    }
    
    #ethiopian-calendar-container .geez-num {
        font-size: 1.8rem;
    }
    
    #ethiopian-calendar-container #holiday-notes-container li {
        flex-direction: column;
        gap: 10px;
    }
}