/* =====================================================
   MODAL STYLES - Zentrale Datei für alle Modals
   ===================================================== */

/* Modal Overlay - standardmäßig versteckt */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* Grundlegende Modal-Struktur */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease-out;
    
    /* Scrollbar ausblenden - browserübergreifend */
    -ms-overflow-style: none;  /* IE, Edge */
    scrollbar-width: none;     /* Firefox */
}

.modal::-webkit-scrollbar {
    display: none;             /* Chrome, Safari, Opera */
}

#deleteModal p {
  padding-left: 10px;
}

.modal-content {
    background-color: #111;
    border: 1px solid #333;
    border-radius: 8px;
    margin: 5% auto;
    padding: 0;
    width: 90%;
    max-width: 500px;
    animation: slideIn 0.3s ease-out;
    position: relative;
    
    /* Scrollbar ausblenden - browserübergreifend */
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.modal-content::-webkit-scrollbar {
    display: none;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px;
  border-bottom: 1px solid #333;
}

.modal-header h3 {
    margin: 0;
    color: #ffee28;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-header h3 i {
  color: #ffee28;
}

.close {
    color: #666;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.close:hover {
    color: #fff;
}

.modal-body {
    padding: 18px 0;
    
    /* Scrollbar ausblenden - browserübergreifend */
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.modal-body::-webkit-scrollbar {
    display: none;
}

/* =====================================================
   GEBURTSDATUM MODALS
   ===================================================== */

   .birthdate-modal .modal-content {
    max-width: 400px;
  }

/* Jahr-Auswahl */
.year-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 0 1rem;
}

.year-range {
    color: #ffee28;
    font-size: 1.2rem;
    font-weight: 600;
}

.nav-arrow {
    background: #333;
    border: 1px solid #555;
    color: #ffee28;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.nav-arrow:hover {
    background: #444;
    border-color: #ffee28;
}

/* Jahr-Grid */
.year-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    padding: 0 1rem;
}

.year-item {
    background-color: #111;
    border: 2px solid #333;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    color: #fff;
}

.year-item:hover {
    border-color: #dccd18;
    background-color: #1a1a1a;
    transform: translateY(-2px);
}

/* Jahr-Display (Monat-Modal) */
.year-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 0 1rem;
}

.selected-year {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffee28;
}

/* Monat-Grid */
.month-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    padding: 0 1rem;
}

.month-item {
    background-color: #111;
    border: 2px solid #333;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    color: #fff;
}

.month-item:hover {
    border-color: #dccd18;
    background-color: #1a1a1a;
    transform: translateY(-2px);
}

/* Datum-Info */
.date-info {
    text-align: center;
    margin-bottom: 2rem;
}

.date-info span {
    color: #ffee28;
    font-size: 1.3rem;
    font-weight: 600;
}

/* Tag-Grid */
.day-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    padding: 0 1rem;
}

.day-item {
    background-color: #111;
    border: 2px solid #333;
    border-radius: 8px;
    padding: 1rem 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    color: #fff;
}

.day-item:hover {
    border-color: #dccd18;
    background-color: #1a1a1a;
    transform: translateY(-2px);
}

/* =====================================================
   MODAL ANIMATIONEN
   ===================================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* =====================================================
   GLOBAL SETTINGS MODAL (Fullscreen)
   ===================================================== */

.modal#globalSettingsModal {
    width: 100svw !important;
    height: 100svh !important;
    padding: 0 !important;
    margin: 0 !important;
}

.modal#globalSettingsModal > .modal-content {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    display: flex !important;
    flex-direction: column !important;
}

.modal#globalSettingsModal .modal-header {
    padding: 1rem 1.5rem;
    flex-shrink: 0;
}

.modal#globalSettingsModal .modal-header .close {
    font-size: 2.5rem;
    color: #999;
    padding: 0 0.5rem;
}

.modal#globalSettingsModal .modal-header .close:hover {
    color: #fff;
}

.modal#globalSettingsModal .modal-body {
    flex: 1 !important;
    overflow-y: auto !important;
    padding: 20px 1.5rem !important;
}

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

@media (max-width: 768px) {
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
    
    .year-grid, .month-grid, .day-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.75rem;
    }
    
    .year-item, .month-item, .day-item {
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }
}
