@charset "UTF-8";

:root {
    --bg: #efefef;
    --card-bg: #FFFFFF;
    --text-primary: #1F2A24;
    --text-secondary: #5B6B62;
    --accent: #0056a9;
    --accent-dark: #004281;
    --border: #D8DED9;
    --border-focus: #2F6F4E;
    --focus-ring: rgba(47, 111, 78, 0.22);
    --error: #C23B3B;
    --error-bg: #FDEDED;
    --error-border: #F3C6C6;
    --radius-card: 10px;
    --radius-field: 8px;
}
.tarjeta {
    width: 100%;
    max-width: 480px;
    background: var(--card-bg);
    border-radius: var(--radius-card);
    box-shadow: 0 20px 60px -20px rgba(31, 42, 36, 0.28);
    padding: 44px 40px 40px;
}

.encabezado h1 {
    font-family: 'Fraunces', serif;
    font-weight: 600;
    font-size: 2rem;
    line-height: 1.15;
    margin: 0 0 8px;
}

.encabezado p {
    margin: 0 0 32px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    max-width: 38ch;
}

/* form { display: flex; flex-direction: column; gap: 20px; } */

.campo {
    position: relative;
    display: flex;
    flex-direction: column;
    /* gap: 6px; */
}

textarea {
  border-radius: 8px !important;
}

/* label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

input {
  height: 60px;
}

input, textarea {
    font-family: "Poppins", sans-serif;
    font-size: 0.95rem;
    color: var(--text-primary);
    background: #f5f5f5;
    border: none;
    border-radius: var(--radius-field);
    padding: 12px 14px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    resize: none !important;
    margin-bottom: 0;
}

textarea { resize: vertical; min-height: 100px; line-height: 1.5; border-radius: 8px 8px 0 0; }

input:focus, textarea:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 4px var(--focus-ring);
} */

.campo.tiene-error input,
.campo.tiene-error textarea {
    border-color: var(--error-border);
}

.contador {
    font-size: 16px;
}

.tp-btn:hover {
  color: #fff;
}

/* ============ Tooltip de error ============ */
.error-tooltip {
    display: none;
    position: absolute;
    left: 0;
    top: calc(100% + 4px);
    z-index: 5;
    background: var(--error-bg);
    color: var(--error);
    border: 1px solid var(--error-border);
    border-radius: 8px;
    padding: 7px 11px;
    font-size: 90%;
    line-height: 1.35;
    max-width: 100%;
    box-shadow: 0 6px 16px -6px rgba(194, 59, 59, 0.35);
}

.error-tooltip::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 16px;
    width: 9px;
    height: 9px;
    background: var(--error-bg);
    border-left: 1px solid var(--error-border);
    border-top: 1px solid var(--error-border);
    transform: rotate(45deg);
}

.error-tooltip.visible {
    display: block;
    animation: tooltipIn 0.18s ease-out;
}

@keyframes tooltipIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.campo-recaptcha { margin-top: 4px; }

button[type="submit"] {
    /* margin-top: 8px;
    border: none;
    border-radius: var(--radius-field);
    padding: 13px 18px;
    font-family: "Poppins", sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    background: var(--accent);
    cursor: pointer; */
    transition: background 0.15s ease, transform 0.1s ease;
    /* border-radius: 60px;
    height: 60px; */
}

button[type="submit"]:hover:not(:disabled) { background: var(--accent-dark); }
button[type="submit"]:active:not(:disabled) { transform: scale(0.99); }

button[type="submit"]:disabled {
    background: #C7CDC9;
    cursor: not-allowed;
}

.error-general {
    background: var(--error-bg);
    border: 1px solid var(--error-border);
    color: var(--error);
    border-radius: var(--radius-field);
    padding: 10px 14px;
    font-size: 0.85rem;
}

@media (max-width: 420px) {
    .tarjeta { padding: 32px 24px 28px; }
    .encabezado h1 { font-size: 1.7rem; }
}

@media (prefers-reduced-motion: reduce) {
    .error-tooltip.visible { animation: none; }
    button[type="submit"] { transition: none; }
}

/* input:focus-visible, textarea:focus-visible, button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
} */
