﻿/* =========================================================
   DTP Form — inputs/labels/CTA premium
   Coincide con paleta del header y del modal.
   ========================================================= */

.dtp-form {
    display: block;
}

/* Honeypot oculto */
.dtp-form__hp {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* Field */
.dtp-field {
    margin-bottom: 16px;
}

.dtp-field__label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: rgba(245, 247, 251, 0.85);
    margin-bottom: 6px;
}

.dtp-field__req {
    color: #ff7b00;
    margin-left: 2px;
}

.dtp-field__control {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

    .dtp-field__control:hover {
        border-color: rgba(255, 255, 255, 0.18);
    }

    .dtp-field__control:focus-within {
        border-color: #00bfff;
        background: rgba(255, 255, 255, 0.06);
        box-shadow: 0 0 0 3px rgba(0, 191, 255, 0.18);
    }

.dtp-field__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    color: rgba(245, 247, 251, 0.55);
    flex-shrink: 0;
}

.dtp-field__input {
    flex: 1;
    background: transparent;
    border: 0;
    outline: 0;
    color: #f5f7fb;
    font: inherit;
    font-size: 0.95rem;
    padding: 11px 14px 11px 0;
    width: 100%;
    min-width: 0;
    -webkit-appearance: none;
    appearance: none;
    line-height: 1.4;
}

    .dtp-field__input::placeholder {
        color: rgba(245, 247, 251, 0.4);
    }

    /* Autofill — evita que Chrome pinte fondo amarillo */
    .dtp-field__input:-webkit-autofill,
    .dtp-field__input:-webkit-autofill:hover,
    .dtp-field__input:-webkit-autofill:focus {
        -webkit-text-fill-color: #f5f7fb;
        -webkit-box-shadow: 0 0 0 1000px rgba(14, 22, 42, 1) inset;
        transition: background-color 9999s ease-out 0s;
        caret-color: #f5f7fb;
    }

.dtp-field__control--textarea {
    align-items: flex-start;
    padding-left: 14px;
}

.dtp-field__input--textarea {
    padding: 11px 14px 11px 0;
    resize: vertical;
    min-height: 84px;
    max-height: 200px;
}

/* Error */
.dtp-field__error {
    color: #ff8a8a;
    font-size: 0.8rem;
    margin: 6px 0 0;
    min-height: 0;
    line-height: 1.3;
}

.dtp-field.is-invalid .dtp-field__control {
    border-color: #ff5d5d;
    box-shadow: 0 0 0 3px rgba(255, 93, 93, 0.16);
}

/* Hint / contador */
.dtp-field__hint {
    text-align: right;
    color: rgba(245, 247, 251, 0.5);
    font-size: 0.75rem;
    margin: 6px 0 0;
}

/* CTA con estado loading */
.dtp-cta {
    position: relative;
}

.dtp-cta__spinner {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(0, 0, 0, 0.25);
    border-top-color: rgba(0, 0, 0, 0.85);
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
}

.dtp-cta.is-loading .dtp-cta__label {
    opacity: 0;
}

.dtp-cta.is-loading .dtp-cta__spinner {
    opacity: 1;
    animation: dtp-spin .7s linear infinite;
}

.dtp-cta.is-loading {
    pointer-events: none;
}

@keyframes dtp-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Botón ghost (cancelar dentro del formulario) */
.dtp-btn--ghost {
    background: transparent;
    color: rgba(245, 247, 251, 0.75);
    border-color: rgba(255, 255, 255, 0.12);
}

    .dtp-btn--ghost:hover {
        background: rgba(255, 255, 255, 0.06);
        color: #fff;
    }

/* Footnote */
.dtp-form__footnote {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
    color: rgba(245, 247, 251, 0.45);
    font-size: 0.75rem;
    margin: 16px 0 0;
}

@media (prefers-reduced-motion: reduce) {
    .dtp-cta__spinner {
        animation: none;
    }
}
