/* =================================================================
   PERFIL.CSS — Estilos para perfil.html y presupuesto.html
   ================================================================= */

/* Loading */
.perfil-loading {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 18px;
  color: var(--text-muted);
}
.perfil-spinner {
  width: 44px; height: 44px;
  border: 3px solid var(--line);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }


/* =================================================================
   HERO del perfil
   ================================================================= */
.perfil-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: white;
  padding: 56px 20px 64px;
  text-align: center;
}
.perfil-hero__avatar {
  width: 84px; height: 84px;
  margin: 0 auto 18px;
  background: var(--teal);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: white;
  letter-spacing: 0.02em;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}
.perfil-hero h1 {
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.perfil-hero__email {
  font-size: 14.5px;
  color: rgba(255, 255, 255, 0.72);
  margin: 0;
}


/* =================================================================
   CONTENEDOR
   ================================================================= */
.perfil-container {
  max-width: 880px;
  margin: -32px auto 60px;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}


/* =================================================================
   SECCIÓN
   ================================================================= */
.perfil-section {
  background: white;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 32px 32px;
  margin-bottom: 24px;
  box-shadow: 0 4px 14px rgba(15, 27, 51, 0.05);
}
.perfil-section__head {
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-soft);
}
.perfil-section__head h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.perfil-section__head p {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}

@media (max-width: 600px) {
  .perfil-section { padding: 24px 22px; }
}


/* =================================================================
   FORMULARIO
   ================================================================= */
.perfil-form__row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}
@media (max-width: 700px) {
  .perfil-form__row { grid-template-columns: 1fr; }
}

.perfil-form__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.perfil-form__field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: -0.005em;
}

.perfil-form input[type="text"],
.perfil-form input[type="tel"],
.perfil-form input[type="email"],
.perfil-form input[type="date"],
.perfil-form input[type="number"],
.perfil-form select,
.perfil-form textarea {
  width: 100%;
  padding: 11px 14px;
  font-family: var(--font-sans);
  font-size: 14.5px;
  color: var(--navy);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm, 8px);
  background: white;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}
.perfil-form textarea {
  resize: vertical;
  min-height: 100px;
  font-family: var(--font-sans);
}
.perfil-form input:focus,
.perfil-form select:focus,
.perfil-form textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(79, 175, 181, 0.15);
}
.perfil-form input::placeholder,
.perfil-form textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

.perfil-form__subhead {
  font-size: 14px;
  font-weight: 700;
  color: var(--teal-deep);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 22px 0 12px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
}
.perfil-form__subhead:first-child {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}
.perfil-form__hint {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 8px;
}

.perfil-form__actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.perfil-form__status {
  font-size: 13.5px;
  font-weight: 600;
  transition: opacity 0.2s ease;
}
.perfil-form__status--pending { color: var(--text-muted); }
.perfil-form__status--ok      { color: #2D8C5A; }
.perfil-form__status--error   { color: #C84B3F; }


/* =================================================================
   ACORDEÓN PRESUPUESTO (reutiliza estilos de entradas-accordion)
   ================================================================= */
.presupuesto-form .entradas-accordion {
  margin-bottom: 14px;
}
.presupuesto-form__final {
  margin-top: 24px;
  padding: 24px;
  background: linear-gradient(135deg, var(--teal-pale) 0%, rgba(212, 162, 74, 0.12) 100%);
  border: 1px solid rgba(79, 175, 181, 0.25);
  border-radius: var(--radius-md);
  text-align: center;
}
.presupuesto-form__final p {
  font-size: 14px;
  color: var(--navy-soft);
  margin-bottom: 14px;
  line-height: 1.55;
}
.presupuesto-form__final .btn {
  font-size: 15px;
  padding: 14px 28px;
}

.presupuesto-success {
  margin: 60px auto;
  max-width: 540px;
  text-align: center;
  padding: 40px 28px;
  background: white;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 14px rgba(15, 27, 51, 0.05);
}
.presupuesto-success__icon {
  width: 64px; height: 64px;
  margin: 0 auto 18px;
  background: rgba(45, 140, 90, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
}
.presupuesto-success h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 12px;
  letter-spacing: -0.015em;
}
.presupuesto-success p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 22px;
}


/* === Utility: visually-hidden === */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* === Radio buttons / checkboxes === */
.perfil-form__radio-group,
.perfil-form__checkbox-group {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.perfil-form__radio,
.perfil-form__checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--navy);
  cursor: pointer;
  background: white;
  transition: all 0.2s ease;
}
.perfil-form__radio:hover,
.perfil-form__checkbox:hover {
  border-color: var(--teal);
}
.perfil-form__radio input,
.perfil-form__checkbox input {
  accent-color: var(--teal);
}
.perfil-form__radio:has(input:checked),
.perfil-form__checkbox:has(input:checked) {
  background: var(--teal-pale);
  border-color: var(--teal);
  color: var(--teal-deep);
  font-weight: 600;
}
