/* ── Custom Registration Fields — Frontend Form Styles ─────────────────────── */

.crp-registration-wrap {
    max-width: 480px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Mensajes de error y éxito */
.crp-errors {
    background: #fcf0f1;
    border-left: 4px solid #d63638;
    border-radius: 4px;
    padding: 12px 16px;
    margin-bottom: 20px;
}
.crp-errors p {
    margin: 4px 0;
    font-size: 14px;
    color: #8a1f1f;
}

.crp-success {
    background: #edfaef;
    border-left: 4px solid #00a32a;
    border-radius: 4px;
    padding: 14px 16px;
    margin-bottom: 20px;
}
.crp-success p {
    margin: 0;
    font-size: 15px;
    color: #145523;
    font-weight: 500;
}

.crp-notice {
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 14px;
}
.crp-already-logged {
    background: #eef3f8;
    color: #1d3557;
    border: 1px solid #2271b1;
}
.crp-disabled {
    background: #f6f7f7;
    color: #50575e;
    border: 1px solid #787c82;
}

/* Formulario */
.crp-form {
    background: #fff;
    border: 1px solid #e2e4e7;
    border-radius: 8px;
    padding: 28px 32px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

/* Cada campo */
.crp-field {
    margin-bottom: 18px;
}

.crp-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
    margin-bottom: 6px;
}

.crp-field input[type="text"],
.crp-field input[type="email"],
.crp-field input[type="tel"],
.crp-field input[type="password"] {
    display: block;
    width: 100%;
    padding: 10px 12px;
    font-size: 15px;
    border: 2px solid #c3c4c7;
    border-radius: 5px;
    background: #fafafa;
    color: #1d2327;
    box-sizing: border-box;
    transition: border-color .15s, background .15s;
    outline: none;
}
.crp-field input:focus {
    border-color: #2271b1;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(34,113,177,.15);
}
.crp-field input:invalid:not(:placeholder-shown) {
    border-color: #d63638;
}

/* Indicadores de obligatorio / opcional */
.crp-req {
    color: #d63638;
    margin-left: 2px;
    font-weight: 700;
}
.crp-opt {
    color: #787c82;
    font-size: 12px;
    font-weight: 400;
    margin-left: 4px;
}

/* Placeholder */
.crp-field input::placeholder {
    color: #a7aaad;
    font-weight: 400;
}

/* ── Privacy Policy checkbox ─────────────────────────────────────────────────
   Same rules apply in all 3 contexts: shortcode, WooCommerce, native WP.
   We use .crp-privacy-wrap / .crp-checkbox-label to avoid conflicts with
   WooCommerce theme checkbox overrides (which target their own classes).
   ──────────────────────────────────────────────────────────────────────────── */

.crp-privacy-wrap {
    margin: 12px 0 16px !important;
    /* Reset WooCommerce row margins that can add unwanted space */
}

/* The label: checkbox + text side by side, no overlap */
.crp-checkbox-label {
    display:     flex         !important;
    align-items: flex-start   !important;
    gap:         10px         !important;
    font-weight: 400          !important;
    cursor:      pointer;
    line-height: 1.5;
    /* Undo any WooCommerce theme padding-left added to checkbox labels */
    padding-left: 0           !important;
}

/* The actual <input type="checkbox"> — fixed size, never shrinks */
.crp-checkbox-label input[type="checkbox"] {
    display:    inline-block !important;
    position:   relative     !important; /* override any absolute positioning from theme */
    appearance: auto         !important; /* show the native checkbox, not a theme pseudo-el */
    -webkit-appearance: checkbox !important;
    width:      18px         !important;
    height:     18px         !important;
    min-width:  18px;
    flex-shrink: 0;
    margin:     2px 0 0 0    !important; /* small top offset to align with first text line */
    padding:    0            !important;
    opacity:    1            !important;
    accent-color: #2271b1;
    cursor:     pointer;
    /* Prevent theme pseudo-elements from hiding the real checkbox */
    border: none;
    background: none;
}

/* The text span next to the checkbox */
.crp-checkbox-label .crp-privacy-text {
    display: inline;
    font-size: 14px;
    color: inherit;
}

.crp-checkbox-label .crp-privacy-text a {
    color: #2271b1;
    text-decoration: underline;
}
.crp-checkbox-label .crp-privacy-text a:hover {
    color: #135e96;
}

/* Botón */
.crp-submit {
    margin-top: 24px;
}
.crp-btn {
    display: inline-block;
    width: 100%;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    background: #2271b1;
    color: #fff;
    transition: background .15s, transform .1s;
    letter-spacing: .3px;
}
.crp-btn:hover {
    background: #135e96;
}
.crp-btn:active {
    transform: scale(.98);
}
.crp-btn:focus-visible {
    outline: 3px solid #2271b1;
    outline-offset: 2px;
}

/* Responsive */
@media (max-width: 520px) {
    .crp-form {
        padding: 20px 16px;
    }
}
