/* ============================================================================
   AKKATT - Pagina "Il mio profilo" (anagrafica utente)
   ============================================================================ */

.profile-page {
  max-width: 40rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.profile-page__back {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
}

.profile-page__back-button {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0;
  border: none;
  background: none;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
}

.profile-page h1 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.profile-page__subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

.profile-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
}

.profile-form__grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

.profile-form__group {
  margin-bottom: 1rem;
}

.profile-form__group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.3rem;
}

.profile-form__group input,
.profile-form__group select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  background: var(--bg-main);
  color: var(--text-main);
}

.profile-form__group input:focus,
.profile-form__group select:focus {
  border-color: var(--primary);
  outline: none;
}

.profile-form__error {
  font-size: 0.85rem;
  color: #b91c1c;
  margin-bottom: 1rem;
}

/* ============================================================================
   Calendario "Data di nascita" — sempre in italiano, indipendente dal browser/OS
   ============================================================================ */

.date-picker {
  position: relative;
}

.date-picker__input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  background: var(--bg-main);
  color: var(--text-main);
  cursor: pointer;
}

.date-picker__input:focus {
  border-color: var(--primary);
  outline: none;
}

.date-picker__panel {
  position: absolute;
  z-index: 20;
  top: calc(100% + 0.4rem);
  left: 0;
  width: 17.5rem;
  padding: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.date-picker__header {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.6rem;
}

.date-picker__nav {
  flex: 0 0 auto;
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-main);
  color: var(--text-main);
  font-size: 0.95rem;
  cursor: pointer;
}

.date-picker__select {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.3rem 0.4rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.8rem;
  background: var(--bg-main);
  color: var(--text-main);
}

.date-picker__weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 0.3rem;
}

.date-picker__weekday {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.date-picker__days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.15rem;
}

.date-picker__day {
  aspect-ratio: 1;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-main);
  font-size: 0.8rem;
  cursor: pointer;
}

.date-picker__day:hover {
  background: var(--bg-main);
}

.date-picker__day--today {
  font-weight: 800;
  color: var(--primary);
}

.date-picker__day--selected {
  background: var(--primary);
  color: #fff;
}

.profile-form__saved {
  font-size: 0.85rem;
  color: #16a34a;
  margin-bottom: 1rem;
}

.profile-form__submit {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

/* ============================================================================
   Libretto indirizzi di spedizione
   ============================================================================ */

.profile-page__section-title {
  margin-top: 2.5rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.address-book__list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.address-book__item {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
}

.address-book__badge {
  display: inline-block;
  margin-bottom: 0.35rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.address-book__name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 0.2rem;
}

.address-book__meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

.address-book__actions {
  display: flex;
  gap: 1rem;
  margin-top: 0.6rem;
}

.address-book__link {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
}

.address-book__link--danger {
  color: #b91c1c;
}

.address-book__empty {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.address-book__add {
  background: none;
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 0.7rem 1rem;
  width: 100%;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
}

.address-book__form {
  margin-top: 1rem;
}

.address-book__checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-main);
  margin-bottom: 1rem;
}

.address-book__form-actions {
  display: flex;
  gap: 0.75rem;
}

.address-book__cancel {
  background: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
}
