/* modals.css · Estilos para modales y overlays */

/* ============================================= */
/*          MODALES BASE                         */
/* ============================================= */
.calendar-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.5);
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.calendar-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
  max-height: 90vh;
  overflow-y: auto;
}

.calendar-modal-content {
  background: var(--panel);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.3);
  width: 90vw;
  max-width: 700px;
  overflow: hidden;
}

.calendar-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  background: var(--surface-muted);
}

.calendar-modal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
}

.calendar-modal-body {
  max-height: calc(90vh - 80px);
  overflow-y: auto;
  padding: 24px;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.btn-close-modal:hover {
  color: var(--primary);
}

/* ============================================= */
/*          CALENDARIO                           */
/* ============================================= */
.calendar-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.calendar-month-selector {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: var(--surface-muted);
  border-radius: var(--radius);
}

.calendar-month-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar-day-header {
  text-align: center;
  padding: 8px;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
  background: var(--surface-muted);
  color: var(--text);
}

.calendar-day:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.calendar-day.selected {
  background: var(--primary);
  color: #FFFFFF;
}

.calendar-day.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.calendar-day.today {
  border: 2px solid var(--primary);
}

/* ============================================= */
/*          CENTRO DE CUENTAS                    */
/* ============================================= */
.account-center-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.6);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.account-center-modal.show {
  opacity: 1;
  visibility: visible;
}

.account-center-content {
  background: var(--panel);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.3);
  width: 90vw;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.account-center-modal.show .account-center-content {
  transform: scale(1);
}

.account-center-header {
  padding: 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.account-center-body {
  padding: 24px;
}

.account-section {
  margin-bottom: 24px;
}

.account-section:last-child {
  margin-bottom: 0;
}

.account-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 12px 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================= */
/*          RESPONSIVE - MOBILE                  */
/* ============================================= */
@media (max-width: 768px) {
  .calendar-modal {
    top: 0;
    left: 0;
    transform: none;
    width: 100%;
    height: 100%;
    max-height: 100vh;
    overflow-y: auto;
  }
  
  .calendar-modal-content {
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    border-radius: 0;
    box-shadow: none;
  }
  
  .calendar-modal-header {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 16px;
  }
  
  .calendar-modal-title {
    font-size: 16px;
  }
  
  .calendar-modal-body {
    max-height: none;
    padding: 16px;
  }
  
  .account-center-content {
    width: 100%;
    max-width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }
  
  .calendar-grid {
    gap: 2px;
  }
  
  .calendar-day {
    font-size: 12px;
  }
}
