@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
    --pdp-font-titulo: 'Fredoka', sans-serif;
    --pdp-font-texto:  'DM Sans', sans-serif;
}

/* =========================================
   Pucodela - Formulario de Registro Protectoras
   ========================================= */

.pdp-registro-wrap {
    font-family: var(--pdp-font-texto);
    max-width: 720px;
    margin: 0 auto;
    font-family: inherit;
}

/* Intro */
.pdp-registro-intro {
    margin-bottom: 28px;
}
.pdp-registro-intro h2 {
    font-family: var(--pdp-font-titulo);
    font-size: 24px;
    font-weight: 700;
    color: #464947;
    margin: 0 0 8px;
}
.pdp-registro-intro p {
    color: #666;
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
}

/* Fieldsets */
.pdp-registro-fieldset {
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 20px;
    background: #fff;
}
.pdp-registro-fieldset legend {
    font-family: var(--pdp-font-titulo);
    font-size: 15px;
    font-weight: 600;
    color: #464947;
    padding: 0 8px;
    margin-left: -4px;
}
.pdp-registro-fieldset--legal {
    background: #fafafa;
}
.pdp-fieldset-desc {
    font-size: 13px;
    color: #888;
    margin: 0 0 16px;
    line-height: 1.5;
}

/* Campos */
.pdp-campo {
    margin-bottom: 16px;
}
.pdp-campo:last-child { margin-bottom: 0; }

.pdp-campo label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}
.pdp-campo label span:not(.pdp-hint) { color: #949D79; }
.pdp-hint {
    font-weight: 400;
    color: #888;
    font-size: 12px;
}

.pdp-campo input[type="text"],
.pdp-campo input[type="email"],
.pdp-campo input[type="tel"],
.pdp-campo input[type="url"],
.pdp-campo textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    color: #333;
    background: #fff;
    transition: border-color .15s;
    box-sizing: border-box;
    line-height: 1.5;
}
.pdp-campo input:focus,
.pdp-campo textarea:focus {
    outline: none;
    border-color: #949D79;
    box-shadow: 0 0 0 3px rgba(148,157,121,.1);
}
.pdp-campo input.pdp-error,
.pdp-campo textarea.pdp-error {
    border-color: #d32f2f;
}
.pdp-campo textarea { resize: vertical; min-height: 80px; }

/* Contador de caracteres */
.pdp-campo-count {
    display: block;
    text-align: right;
    font-size: 11px;
    color: #aaa;
    margin-top: 4px;
}

/* Fila de dos columnas */
.pdp-campo-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}
@media (max-width: 600px) {
    .pdp-campo-row { grid-template-columns: 1fr; }
}

/* Input con prefijo */
.pdp-input-prefix {
    display: flex;
    align-items: center;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    transition: border-color .15s;
}
.pdp-input-prefix:focus-within {
    border-color: #949D79;
    box-shadow: 0 0 0 3px rgba(148,157,121,.1);
}
.pdp-input-prefix span {
    background: #f5f5f5;
    padding: 10px 12px;
    font-size: 14px;
    color: #888;
    border-right: 1px solid #ddd;
    white-space: nowrap;
}
.pdp-input-prefix input {
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    flex: 1;
}

/* Upload area */
.pdp-upload-area {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    position: relative;
    background: #fafafa;
}
.pdp-upload-area:hover { border-color: #949D79; background: #f5f6f2; }
.pdp-upload-area input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}
.pdp-upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.pdp-upload-icon { font-size: 28px; }
.pdp-upload-placeholder span { font-size: 14px; color: #555; }
.pdp-upload-hint { font-size: 12px; color: #aaa !important; }
.pdp-upload-placeholder u { color: #949D79; text-decoration-color: #949D79; }

.pdp-upload-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.pdp-upload-preview img {
    max-height: 80px;
    max-width: 200px;
    object-fit: contain;
    border-radius: 4px;
}
.pdp-upload-remove {
    background: #fee;
    border: 1px solid #fcc;
    color: #c62828;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    z-index: 2;
}

/* Checkbox */
.pdp-campo--checkbox label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: 400;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    line-height: 1.5;
}
.pdp-campo--checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: #949D79;
    cursor: pointer;
}

/* Errores */
.pdp-campo-error {
    display: block;
    font-size: 12px;
    color: #d32f2f;
    margin-top: 4px;
    min-height: 16px;
}
.pdp-cobro-warning {
    background: #fff3e0;
    border: 1px solid #ffcc02;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 13px;
    color: #e65100;
    margin-top: 8px;
}
.pdp-form-error {
    background: #ffebee;
    border: 1px solid #ef9a9a;
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 14px;
    color: #c62828;
    margin-bottom: 16px;
}

/* Botón submit */
.pdp-registro-submit {
    text-align: center;
    padding: 8px 0 24px;
}
.pdp-registro-wrap .pdp-btn-submit,
.pdp-registro-wrap .pdp-btn-submit:not(.wp-block-button__link) {
    background: #949D79 !important;
    color: #fff !important;
    border: none !important;
    padding: 14px 36px !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    font-family: inherit !important;
    transition: background .15s, transform .1s !important;
    min-width: 240px !important;
    box-shadow: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    line-height: 1.4 !important;
    display: inline-block !important;
    width: auto !important;
}
.pdp-registro-wrap .pdp-btn-submit:hover {
    background: #7a8460 !important;
    color: #fff !important;
}
.pdp-registro-wrap .pdp-btn-submit:active {
    transform: scale(.98) !important;
}
.pdp-registro-wrap .pdp-btn-submit:disabled {
    background: #ccc !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* Mensaje de éxito */
.pdp-registro-ok {
    text-align: center;
    padding: 60px 24px;
    background: #f0fff4;
    border: 1px solid #a5d6a7;
    border-radius: 12px;
}
.pdp-registro-ok__icon { font-size: 52px; margin-bottom: 16px; }
.pdp-registro-ok h3 {
    font-family: var(--pdp-font-titulo);
    font-size: 22px;
    font-weight: 700;
    color: #1a6630;
    margin: 0 0 12px;
}
.pdp-registro-ok p {
    color: #444;
    font-size: 15px;
    line-height: 1.6;
    max-width: 480px;
    margin: 0 auto;
}
