.owfin-box,
.owfin-box * {
  box-sizing: border-box;
}

.owfin-box {
  width: 100%;
  max-width: 980px;
  padding: clamp(14px, 2vw, 22px);
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #fff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  box-shadow: 0 10px 26px rgba(17, 24, 39, 0.06);
}

.owfin-title {
  margin: 0 0 12px 0;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 850;
  color: var(--owfin-primary, #111827);
}

.owfin-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 560px;
  margin: 0 0 11px 0;
}

.owfin-label {
  display: block;
  margin: 0;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.2;
  color: #374151;
}

.owfin-input,
.owfin-select {
  box-sizing: border-box;
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 15px;
  line-height: 1.2;
  color: #111827;
  background-color: #fff;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.owfin-input:focus,
.owfin-select:focus {
  border-color: var(--owfin-primary, #111827);
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.10);
}

.owfin-results {
  max-width: 560px;
  margin-top: 6px;
  padding: 12px;
  border-radius: 13px;
  background: linear-gradient(180deg, #f9fafb 0%, #f3f4f6 100%);
  border: 1px solid #eef2f7;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.owfin-result {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.owfin-result-label {
  font-size: 13px;
  color: #4b5563;
}

.owfin-result-value {
  font-size: 15px;
  font-weight: 800;
  color: #111827;
  white-space: nowrap;
}

.owfin-result-strong {
  padding-top: 8px;
  border-top: 1px dashed #d1d5db;
}

.owfin-result-strong .owfin-result-value {
  font-size: 21px;
  color: var(--owfin-primary, #111827);
}

.owfin-pdf-button {
  box-sizing: border-box;
  width: 100%;
  max-width: 560px;
  margin-top: 12px;
  padding: 11px 14px;
  border: 0;
  border-radius: 12px;
  background: var(--owfin-primary, #111827);
  color: #fff;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 140ms ease, opacity 140ms ease, box-shadow 140ms ease;
  box-shadow: 0 8px 16px rgba(17, 24, 39, 0.12);
}

.owfin-pdf-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 11px 20px rgba(17, 24, 39, 0.16);
}

.owfin-pdf-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.owfin-note {
  max-width: 560px;
  margin: 9px 0 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: #6b7280;
}

.owfin-request[hidden] {
  display: none !important;
}

.owfin-request {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #fbfcfe;
}

.owfin-request-header {
  margin: 0 0 10px 0;
  padding: 0 0 8px 0;
  border-bottom: 1px solid #e5e7eb;
}

.owfin-request-header h4 {
  margin: 0 0 3px 0;
  font-size: 20px;
  line-height: 1.15;
  font-weight: 900;
  color: #111827;
}

.owfin-request-header p {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
  color: #6b7280;
}

.owfin-form-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 10px 0;
}

.owfin-form-summary > div {
  padding: 9px 11px;
  min-height: auto;
  border: 1px solid #e5e7eb;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 5px 14px rgba(17, 24, 39, 0.035);
}

.owfin-form-summary span {
  display: block;
  margin: 0 0 4px 0;
  font-size: 12px;
  line-height: 1.2;
  color: #6b7280;
}

.owfin-form-summary strong {
  display: block;
  margin: 0;
  font-size: 17px;
  line-height: 1.2;
  color: #111827;
}

.owfin-request-form {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 12px 14px !important;
  align-items: flex-start !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Evita que algunos temas conviertan los inputs hidden en bloques y creen un hueco enorme al inicio del formulario. */
.owfin-request-form > input[type="hidden"] {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  position: absolute !important;
  overflow: hidden !important;
  flex: 0 0 0 !important;
}

.owfin-form-section {
  flex: 0 0 100% !important;
  width: 100% !important;
  margin: 8px 0 -2px 0 !important;
  padding: 10px 0 0 0 !important;
  border-top: 1px solid #e5e7eb;
}

.owfin-form-section:first-of-type {
  margin-top: 0 !important;
  padding-top: 0 !important;
  border-top: 0 !important;
}

.owfin-form-section span {
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  line-height: 1.15 !important;
  color: #111827 !important;
}

.owfin-form-section span::before {
  content: "";
  display: inline-block;
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--owfin-primary, #111827);
}

.owfin-field {
  flex: 1 1 calc(50% - 7px) !important;
  width: calc(50% - 7px) !important;
  min-width: 260px !important;
  max-width: 100% !important;
  display: block !important;
  align-self: flex-start !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  clear: none !important;
  position: relative !important;
}

.owfin-field-full {
  flex-basis: 100% !important;
  width: 100% !important;
}

/* Cada etiqueta y su campo quedan dentro del mismo bloque. Esto evita el efecto visual de "labels arriba y campos abajo" que provocan algunos temas. */
.owfin-field label {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 0 5px 0 !important;
  padding: 0 !important;
  float: none !important;
  clear: both !important;
  position: static !important;
  transform: none !important;
  text-align: left !important;
  white-space: normal !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  color: #111827 !important;
}

.owfin-field input,
.owfin-field select,
.owfin-field textarea {
  display: block !important;
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: none !important;
  min-height: 38px !important;
  height: auto !important;
  margin: 0 !important;
  padding: 8px 11px !important;
  border: 1px solid #d1d5db !important;
  border-radius: 10px !important;
  background-color: #fff !important;
  color: #111827 !important;
  font-family: inherit !important;
  font-size: 14px !important;
  line-height: 1.25 !important;
  outline: none !important;
  float: none !important;
  clear: both !important;
  position: relative !important;
  top: auto !important;
  left: auto !important;
  transform: none !important;
  transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.owfin-field textarea {
  min-height: 78px !important;
  resize: vertical;
}

.owfin-field input[type="file"] {
  min-height: 38px !important;
  padding: 6px !important;
  cursor: pointer;
}

.owfin-field input:focus,
.owfin-field select:focus,
.owfin-field textarea:focus {
  border-color: var(--owfin-primary, #111827) !important;
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.10) !important;
}

.owfin-field input[readonly] {
  background: #f3f4f6 !important;
  color: #111827 !important;
  font-weight: 850 !important;
}

.owfin-field small {
  display: block !important;
  margin: 5px 0 0 0 !important;
  padding: 0 !important;
  font-size: 12px !important;
  line-height: 1.25 !important;
  color: #6b7280 !important;
}

.owfin-submit-button {
  flex: 0 0 100% !important;
  box-sizing: border-box;
  width: 100%;
  margin: 4px 0 0 0;
  padding: 12px 15px;
  border: 0;
  border-radius: 12px;
  background: var(--owfin-primary, #111827);
  color: #fff;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 900;
  cursor: pointer;
  transition: transform 140ms ease, opacity 140ms ease, box-shadow 140ms ease;
  box-shadow: 0 8px 16px rgba(17, 24, 39, 0.12);
}

.owfin-submit-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 11px 20px rgba(17, 24, 39, 0.16);
}

.owfin-submit-button:disabled {
  opacity: 0.55;
  cursor: wait;
  box-shadow: none;
}

.owfin-form-status {
  flex: 0 0 100% !important;
  width: 100% !important;
  min-height: 0;
  padding: 0;
  font-size: 13px;
  line-height: 1.35;
  color: #4b5563;
}

.owfin-form-status.is-success {
  padding: 9px 11px;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  background: #f0fdf4;
  color: #166534;
}

.owfin-form-status.is-error {
  padding: 9px 11px;
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: #fef2f2;
  color: #991b1b;
}

@media (max-width: 780px) {
  .owfin-form-summary {
    grid-template-columns: 1fr;
  }

  .owfin-field,
  .owfin-field-full,
  .owfin-form-section,
  .owfin-submit-button,
  .owfin-form-status {
    flex-basis: 100% !important;
    width: 100% !important;
    min-width: 0 !important;
  }
}

@media (max-width: 480px) {
  .owfin-box {
    padding: 14px;
  }

  .owfin-request {
    padding: 14px;
  }

  .owfin-result {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }
}
