/**
 * Hello Plataforma · Creator Settings Screen Styles
 *
 * Pantalla de configuración para María.
 */


/* ============================================================
   CONTAINER
   ============================================================ */

.hp-settings-wrapper {
  background: var(--hp-bg-secondary);
}

.hp-settings {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px 16px 100px;
}


/* ============================================================
   ALERT (CLABE no configurada)
   ============================================================ */

.hp-settings-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(217, 119, 87, 0.10) 0%, rgba(217, 119, 87, 0.04) 100%);
  border: 0.5px solid rgba(217, 119, 87, 0.30);
  border-radius: 14px;
  margin-bottom: 24px;
}

.hp-settings-alert-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, #E8956C 0%, #D97757 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.30);
}

.hp-settings-alert-icon i {
  font-size: 20px;
  color: #FFFFFF;
}

.hp-settings-alert-content {
  flex: 1;
  min-width: 0;
}

.hp-settings-alert-title {
  font-family: var(--hp-font-base);
  font-size: 13px;
  font-weight: 700;
  color: #8E5333;
  margin: 0;
  line-height: 1.3;
}

.hp-settings-alert-sub {
  font-family: var(--hp-font-base);
  font-size: 12px;
  color: #A86948;
  margin: 4px 0 0;
  line-height: 1.5;
}


/* ============================================================
   FORM
   ============================================================ */

.hp-settings-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hp-settings-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}


/* ============================================================
   CARD
   ============================================================ */

.hp-settings-card {
  background: var(--hp-bg-primary);
  border: 0.5px solid var(--hp-border-purple);
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 4px 12px -2px rgba(105, 73, 158, 0.04);
}


/* ============================================================
   SELECT
   ============================================================ */

.hp-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%238E8B96' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}


/* ============================================================
   CLABE INPUT (más grande, monoespaciada)
   ============================================================ */

.hp-input-clabe {
  font-family: var(--hp-font-mono, 'JetBrains Mono', monospace);
  letter-spacing: 1px;
  font-size: 15px;
  font-weight: 600;
  font-feature-settings: 'tnum' 1, 'lnum' 1;
}


/* ============================================================
   PRICE INPUT
   ============================================================ */

.hp-price-input-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--hp-bg-primary);
  border: 1px solid var(--hp-border-subtle);
  border-radius: 12px;
  padding: 0 14px;
  margin-top: 6px;
  transition: border-color var(--hp-duration-normal) var(--hp-ease);
}

.hp-price-input-wrap:focus-within {
  border-color: var(--hp-purple);
  box-shadow: 0 0 0 3px rgba(149, 117, 205, 0.15);
}

.hp-price-input-currency {
  font-family: var(--hp-font-base);
  font-size: 18px;
  font-weight: 600;
  color: var(--hp-text-primary);
}

.hp-price-input {
  flex: 1;
  border: none !important;
  background: transparent !important;
  outline: none !important;
  padding: 14px 0 !important;
  font-family: var(--hp-font-base);
  font-size: 18px;
  font-weight: 700;
  color: var(--hp-text-primary);
  font-feature-settings: 'tnum' 1, 'lnum' 1;
  box-shadow: none !important;
}

.hp-price-input::-webkit-inner-spin-button,
.hp-price-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.hp-price-input-suffix {
  font-family: var(--hp-font-base);
  font-size: 11px;
  color: var(--hp-text-tertiary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
}


/* ============================================================
   TEXTAREA
   ============================================================ */

.hp-textarea {
  resize: vertical;
  min-height: 80px;
  font-family: var(--hp-font-base);
  line-height: 1.5;
}


/* ============================================================
   ACTIONS (sticky abajo)
   ============================================================ */

.hp-settings-actions {
  position: sticky;
  bottom: 76px; /* sobre el bottom nav */
  background: linear-gradient(180deg, transparent 0%, var(--hp-bg-secondary) 30%);
  padding: 24px 0 8px;
  margin-top: 8px;
  z-index: 10;
}


/* ============================================================
   ESTADO: campo con error
   ============================================================ */

.hp-input.has-error,
.hp-input-clabe.has-error {
  border-color: var(--hp-red-error, #C04545);
  box-shadow: 0 0 0 3px rgba(192, 69, 69, 0.10);
}

.hp-form-error {
  font-family: var(--hp-font-base);
  font-size: 12px;
  color: var(--hp-red-error, #C04545);
  margin: 4px 0 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.hp-form-error[hidden],
.hp-form-error.is-hidden {
  display: none !important;
}

.hp-form-error::before {
  content: '⚠';
  font-size: 11px;
}

.hp-form-error:empty {
  display: none !important;
}

.hp-form-error:empty::before {
  display: none;
}


/* ============================================================
   ESTADO: campo con warning (no bloquea, solo advierte)
   ============================================================ */

.hp-input.has-warning,
.hp-input-clabe.has-warning {
  border-color: var(--hp-amber-warning, #D97757);
  box-shadow: 0 0 0 3px rgba(217, 119, 87, 0.10);
}

.hp-form-error.is-warning {
  color: var(--hp-amber-warning, #D97757);
}

.hp-form-error.is-warning::before {
  content: 'ℹ';
}


/* ============================================================
   ESTADO: campo guardado exitosamente (flash)
   ============================================================ */

@keyframes hpFieldSaved {
  0%, 100% {
    border-color: var(--hp-border-subtle);
  }
  50% {
    border-color: var(--hp-green-success);
    box-shadow: 0 0 0 3px rgba(29, 158, 117, 0.15);
  }
}

.hp-input.is-saved-flash {
  animation: hpFieldSaved 1500ms ease-out;
}


/* ============================================================
   SECCIÓN: CUENTA · logout
   ============================================================ */

.hp-settings-section-account {
  margin-top: 24px;
}

.hp-account-info {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--hp-border-subtle, rgba(0,0,0,0.08));
}

.hp-account-info-label {
  font-family: var(--hp-font-base, 'Inter', sans-serif);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--hp-text-tertiary, #8B8499);
  margin: 0 0 4px;
}

.hp-account-info-email {
  font-family: var(--hp-font-base, 'Inter', sans-serif);
  font-size: 14px;
  font-weight: 600;
  color: var(--hp-text-primary, #1A1726);
  margin: 0;
  word-break: break-all;
}

.hp-btn-logout {
  color: var(--hp-text-secondary, #5B5566) !important;
  background: transparent !important;
  border: 1px solid var(--hp-border-subtle, rgba(0,0,0,0.10)) !important;
  text-decoration: none !important;
}

.hp-btn-logout:hover {
  color: #B82C3D !important;
  border-color: rgba(184, 44, 61, 0.30) !important;
  background: rgba(184, 44, 61, 0.04) !important;
}

.hp-btn-logout i {
  font-size: 18px;
}


/* ============================================================
   IMAGE UPLOADER (v1.1.15)
   Subir avatar, portada y galería desde el config
   ============================================================ */

.hp-img-uploader {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hp-img-uploader-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 200px;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(149, 117, 205, 0.06);
  border: 1.5px dashed rgba(149, 117, 205, 0.30);
  transition: border-color 200ms ease, background-color 200ms ease;
}

.hp-img-uploader-preview.has-image {
  border-style: solid;
  border-color: rgba(149, 117, 205, 0.25);
  background: transparent;
}

.hp-img-uploader-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Hero · ratio horizontal */
.hp-img-uploader-hero .hp-img-uploader-preview {
  aspect-ratio: 1200 / 630;
  max-width: 100%;
}

/* Galería · ratio cuadrado · más compactas */
.hp-img-uploader-preview-gallery {
  max-width: 100%;
  aspect-ratio: 1 / 1;
}

.hp-img-uploader-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: rgba(149, 117, 205, 0.55);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.hp-img-uploader-placeholder i {
  font-size: 32px;
}

.hp-img-uploader-actions {
  display: flex;
  gap: 8px;
}

.hp-img-uploader-status {
  margin: 0;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.hp-img-uploader-status.is-uploading {
  color: var(--hp-purple-deep);
}
.hp-img-uploader-status.is-success {
  color: #2D8F4F;
}
.hp-img-uploader-status.is-error {
  color: #B82C3D;
}

/* Galería · grid 3 columnas */
.hp-img-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.hp-img-gallery-item .hp-img-uploader {
  gap: 6px;
}

.hp-img-gallery-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  background: rgba(149, 117, 205, 0.08);
  color: var(--hp-purple-deep);
  font-size: 12px;
  font-weight: 600;
  border-radius: 99px;
  cursor: pointer;
  transition: background-color 150ms ease;
  text-align: center;
}

.hp-img-gallery-label:hover {
  background: rgba(149, 117, 205, 0.15);
}

@media (max-width: 480px) {
  .hp-img-gallery-grid {
    gap: 8px;
  }
}