/**
 * Expediente documentation portal styles (scoped).
 */

.kh-exp {
  --kh-navy: #102962;
  --kh-mint: #17d4be;
  --kh-soft: #f3f4f7;
  --kh-wash: rgba(16, 41, 98, 0.06);
  font-family: Urbanist, system-ui, sans-serif;
  color: var(--kh-navy);
}

.kh-exp-banner {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 85% 20%, rgba(23, 212, 190, 0.28), transparent 55%),
    linear-gradient(135deg, #0b1b42 0%, #102962 48%, #14336e 100%);
  color: #fff;
}

.kh-exp-banner__inner {
  max-width: 1100px;
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 900px) {
  .kh-exp-banner__inner {
    grid-template-columns: 1.35fr 0.85fr;
    gap: 3rem;
  }
}

.kh-exp-banner__eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--kh-mint);
}

.kh-exp-banner__title {
  margin: 0 0 1rem;
  font-family: "Feature Deck LC Web", Urbanist, serif;
  font-weight: 500;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #fff;
}

.kh-exp-banner__subtitle {
  margin: 0;
  max-width: 38rem;
  font-size: 1.05rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.88);
}

.kh-exp-banner__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.kh-exp-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  font-size: 16px;
  font-weight: 400;
}

.kh-exp-chip--mint {
  border-color: rgba(23, 212, 190, 0.55);
  color: var(--kh-mint);
}

.kh-exp-banner__visual {
  display: flex;
  justify-content: center;
}

.kh-exp-banner__art {
  width: min(100%, 330px);
  height: auto;
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.25));
}

.kh-exp-body {
  background:
    linear-gradient(180deg, rgba(23, 212, 190, 0.06) 0%, transparent 180px),
    #fff;
}

.kh-exp-body__inner {
  width: 100%;
  max-width: none;
}

.kh-exp-alert {
  border: 1.5px solid rgba(16, 41, 98, 0.15);
  border-radius: 14px;
  background: var(--kh-soft);
  padding: 1.5rem 1.25rem;
  max-width: 40rem;
}

.kh-exp-alert--warn {
  border-color: rgba(179, 45, 46, 0.35);
  background: #fff5f5;
}

.kh-exp-alert strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 1.1rem;
}

.kh-exp-alert p {
  margin: 0;
  color: rgba(16, 41, 98, 0.85);
}

.kh-exp-form {
  display: block;
}

.kh-exp-names {
  margin: 0 0 2rem;
  padding: 1.25rem 1.25rem 1.1rem;
  border: 1.5px solid rgba(16, 41, 98, 0.14);
  border-radius: 16px;
  background:
    linear-gradient(165deg, rgba(23, 212, 190, 0.08), transparent 55%),
    #fff;
}

.kh-exp-names--in-section {
  margin: 0 0 1.25rem;
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid rgba(16, 41, 98, 0.1);
  background: rgba(255, 255, 255, 0.72);
}

.kh-exp-names__title {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--kh-navy);
}

.kh-exp-names__grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .kh-exp-names__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.kh-exp-names__person {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(16, 41, 98, 0.08);
}

.kh-exp-names__person:last-of-type {
  border-bottom: 0;
  margin-bottom: 0.35rem;
  padding-bottom: 0;
}

.kh-exp-names__person-title {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--kh-navy);
}

.kh-exp-names__field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: rgba(16, 41, 98, 0.78);
}

.kh-exp-names__value {
  display: block;
  padding: 0.7rem 0.9rem;
  border: 1px solid rgba(16, 41, 98, 0.12);
  border-radius: 10px;
  font-weight: 600;
  color: var(--kh-navy);
  background: rgba(16, 41, 98, 0.03);
}

.kh-exp-names__field input {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(16, 41, 98, 0.16);
  border-radius: 10px;
  font: inherit;
  font-weight: 500;
  color: var(--kh-navy);
  background: #fff;
}

.kh-exp-names__field input:focus {
  outline: none;
  border-color: rgba(23, 212, 190, 0.7);
  box-shadow: 0 0 0 3px rgba(23, 212, 190, 0.18);
}

.kh-exp-names__help {
  margin: 0.85rem 0 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: rgba(16, 41, 98, 0.62);
}

.kh-exp-section {
  position: relative;
  margin-bottom: 2.25rem;
  padding: 1.35rem 1.25rem 1.35rem;
  border: 1.5px solid rgba(16, 41, 98, 0.14);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(16, 41, 98, 0.04);
}

.kh-exp-section--applicant {
  margin-bottom: 2.75rem;
  padding-top: 1.5rem;
  border-left-width: 4px;
  border-left-color: var(--kh-mint);
  background:
    linear-gradient(90deg, rgba(23, 212, 190, 0.07), transparent 42%),
    #fff;
}

.kh-exp-section--applicant-2 {
  border-left-color: var(--kh-navy);
  background:
    linear-gradient(90deg, rgba(16, 41, 98, 0.07), transparent 42%),
    #fff;
}

.kh-exp-section--applicant + .kh-exp-section--applicant {
  margin-top: 0.5rem;
}

.kh-exp-section__header {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin: 0 0 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(16, 41, 98, 0.1);
}

.kh-exp-section__badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
  background: var(--kh-mint);
  color: #0b1b42;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
}

.kh-exp-section--applicant-2 .kh-exp-section__badge {
  background: var(--kh-navy);
  color: #fff;
}

.kh-exp-section__heading {
  min-width: 0;
}

.kh-exp-section__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--kh-navy);
}

.kh-exp-section--shared .kh-exp-section__title {
  font-size: 1.05rem;
}

.kh-exp-section__subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.92rem;
  line-height: 1.4;
  color: rgba(16, 41, 98, 0.65);
}

.kh-exp-section__person-name {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.55rem 0 0;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--kh-navy);
}

.kh-exp-section__person-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  background: rgba(23, 212, 190, 0.18);
  color: var(--kh-navy);
}

.kh-exp-section__person-icon svg {
  display: block;
}

/* Legacy absolute title fallback (kept unused) */
.kh-exp-section > .kh-exp-section__title {
  position: absolute;
  top: 0;
  left: 1rem;
  transform: translateY(-50%);
  margin: 0;
  padding: 0.15rem 0.65rem;
  background: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--kh-navy);
}

.kh-exp-slots {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: start;
}

@media (min-width: 768px) {
  .kh-exp-slots {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.15rem 1.25rem;
  }
}

.kh-exp-slot {
  display: flex;
  flex-direction: column;
  height: auto;
  padding: 1rem 1rem 1.1rem;
  border: 1px solid rgba(16, 41, 98, 0.1);
  border-radius: 12px;
  background:
    linear-gradient(165deg, rgba(23, 212, 190, 0.05), transparent 42%),
    var(--kh-soft);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.kh-exp-slot:hover {
  border-color: rgba(23, 212, 190, 0.45);
  box-shadow: 0 8px 20px rgba(16, 41, 98, 0.06);
}

.kh-exp-slot__head {
  flex: 0 0 auto;
  margin-bottom: 0.65rem;
  min-height: 0;
}

.kh-exp-slot__label {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 700;
  color: var(--kh-navy);
}

.kh-exp-slot__star {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.3rem;
  color: #b32d2e;
  vertical-align: middle;
  line-height: 1;
}

.kh-exp-slot__star svg {
  display: block;
}

.kh-exp-slot--required.is-invalid {
  border-color: rgba(179, 45, 46, 0.45);
  box-shadow: 0 0 0 2px rgba(179, 45, 46, 0.12);
}

.kh-exp-slot--required.is-invalid .kh-exp-dropzone.dropzone {
  border-color: rgba(179, 45, 46, 0.45) !important;
  background: #fff8f8 !important;
}

.kh-exp-slot__help {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: rgba(16, 41, 98, 0.68);
}

.kh-exp-dropzone.dropzone {
  min-height: 88px;
  margin-top: 0;
  border: 1.5px dashed rgba(16, 41, 98, 0.28) !important;
  border-radius: 10px !important;
  background: #fff !important;
  padding: 0.75rem !important;
  transition: border-color 0.25s ease, background 0.25s ease;
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 0.5rem;
  overflow: hidden;
}

.kh-exp-dropzone.dropzone:hover,
.kh-exp-dropzone.dropzone.dz-drag-hover {
  border-color: var(--kh-mint) !important;
  background: rgba(23, 212, 190, 0.06) !important;
}

.kh-exp-dropzone .dz-message {
  margin: 0 !important;
  padding: 0.85rem 0.5rem;
  font-weight: 600;
  color: rgba(16, 41, 98, 0.7);
  pointer-events: none;
  font-size: 0.92rem;
  text-align: center;
  line-height: 1.35;
  width: 100%;
}

.kh-exp-dropzone.dz-started {
  justify-content: flex-start;
  align-items: stretch;
}

.kh-exp-dropzone.dz-started .dz-message {
  display: inline-flex !important;
  order: 99;
  align-self: center;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  width: auto !important;
  max-width: max-content;
  margin: 0.25rem auto 0 !important;
  padding: 0.22rem 0.55rem !important;
  border: 1px solid rgba(23, 212, 190, 0.65);
  border-radius: 999px;
  background: rgba(23, 212, 190, 0.12);
  color: var(--kh-navy);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.15;
  pointer-events: none;
  white-space: nowrap;
}

.kh-exp-dropzone.dz-started .dz-message span {
  pointer-events: none;
}

.kh-exp-dropzone.dz-started .dz-message::before {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 999px;
  background: var(--kh-mint);
  color: #102962;
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1;
  flex: 0 0 auto;
}

/* Override Dropzone default preview cards */
.kh-exp-dropzone .dz-preview,
.kh-exp-dropzone .kh-dz-preview {
  display: flex !important;
  align-items: center;
  gap: 0.7rem;
  width: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0.55rem 0.65rem !important;
  border: 1px solid rgba(16, 41, 98, 0.12) !important;
  border-radius: 8px !important;
  background: var(--kh-soft) !important;
  box-shadow: none !important;
  position: relative !important;
  float: none !important;
}

.kh-exp-dropzone .dz-preview .dz-image,
.kh-exp-dropzone .dz-preview .dz-success-mark,
.kh-exp-dropzone .dz-preview .dz-error-mark,
.kh-exp-dropzone .dz-preview .dz-progress {
  display: none !important;
}

.kh-dz-preview__icon {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(23, 212, 190, 0.25), rgba(16, 41, 98, 0.08));
  border: 1px solid rgba(16, 41, 98, 0.12);
  position: relative;
}

.kh-dz-preview__icon::after {
  content: "";
  position: absolute;
  inset: 9px 11px 8px 11px;
  border: 2px solid var(--kh-navy);
  border-radius: 2px;
  opacity: 0.7;
}

.kh-dz-preview__body {
  flex: 1 1 auto;
  min-width: 0;
}

.kh-dz-preview__name,
.kh-exp-dropzone .dz-preview .dz-filename,
.kh-exp-dropzone .dz-preview [data-dz-name] {
  display: block;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--kh-navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.kh-dz-preview__meta,
.kh-exp-dropzone .dz-preview .dz-size {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.75rem;
  color: rgba(16, 41, 98, 0.6);
}

.kh-dz-preview__meta strong,
.kh-exp-dropzone .dz-preview .dz-size strong,
.kh-exp-dropzone .dz-preview .dz-size span {
  background: transparent !important;
  font-weight: 600;
  padding: 0 !important;
  border: 0 !important;
}

.kh-dz-preview__progress {
  margin-top: 0.35rem;
  height: 4px;
  border-radius: 999px;
  background: rgba(16, 41, 98, 0.1);
  overflow: hidden;
}

.kh-dz-preview__progress .dz-upload {
  display: block;
  height: 100%;
  width: 0;
  background: var(--kh-mint);
  border-radius: 999px;
}

.kh-exp-dropzone .dz-preview.dz-success .kh-dz-preview__progress,
.kh-exp-dropzone .dz-preview.dz-complete .kh-dz-preview__progress {
  display: none;
}

.kh-dz-preview__error,
.kh-exp-dropzone .dz-preview .dz-error-message {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: #b32d2e;
  position: static !important;
  opacity: 1 !important;
  display: none;
}

.kh-exp-dropzone .dz-preview.dz-error .kh-dz-preview__error,
.kh-exp-dropzone .dz-preview.dz-error .dz-error-message {
  display: block;
}

.kh-dz-preview__remove,
.kh-exp-dropzone .dz-preview .dz-remove {
  flex: 0 0 auto;
  margin: 0 !important;
  padding: 0.35rem 0.7rem !important;
  border-radius: 999px !important;
  border: 1px solid rgba(179, 45, 46, 0.25) !important;
  background: #fff !important;
  color: #b32d2e !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  line-height: 1.2;
  opacity: 1 !important;
  position: static !important;
}

.kh-dz-preview__remove:hover,
.kh-exp-dropzone .dz-preview .dz-remove:hover {
  background: #fff5f5 !important;
}

.kh-exp-dropzone .dz-details {
  padding: 0 !important;
  min-width: 0;
  width: auto !important;
  opacity: 1 !important;
  position: static !important;
  background: transparent !important;
}

.kh-exp-dropzone .dz-details span {
  background: transparent !important;
}

.kh-exp-locked {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.kh-exp-locked li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  background: var(--kh-wash);
  font-size: 0.9rem;
  font-weight: 600;
}

.kh-exp-locked__badge {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(23, 212, 190, 0.2);
  color: var(--kh-navy);
  font-size: 0.75rem;
  font-weight: 700;
}

.kh-exp-locked-note {
  margin: 0 0 0.75rem;
  font-size: 16px;
  color: rgba(16, 41, 98, 0.65);
}

.kh-exp-submit-wrap {
  margin-top: 2rem;
  text-align: center;
}

.kh-exp-submit-hint {
  margin: 0 0 1.25rem;
  font-size: 0.92rem;
  color: rgba(16, 41, 98, 0.75);
}

.kh-exp-feedback {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  font-weight: 600;
}

.kh-exp-feedback.is-ok {
  background: rgba(23, 212, 190, 0.15);
  color: var(--kh-navy);
}

.kh-exp-feedback.is-error {
  background: #fff5f5;
  color: #b32d2e;
}

@media (prefers-reduced-motion: reduce) {
  .kh-exp-slot,
  .kh-exp-submit,
  .kh-exp-dropzone.dropzone {
    transition: none;
  }
}
