/* Login / Register modal (Pinky Deal). Estilo del sitio, sin inline (CSP estricta). */

/* Disparador: el icono de usuario del header actúa como botón. */
.if6Nv2sXPy1bXNua0 {
    cursor: pointer;
}

.pd-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.pd-modal[hidden] {
    display: none;
}

.pd-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 20, 20, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: pd-modal-fade 0.2s ease;
}

.pd-modal__dialog {
    position: relative;
    width: 100%;
    max-width: 420px;
    max-height: calc(100dvh - 40px);
    overflow-y: auto;
    background: #fff;
    color: #141414;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(20, 20, 20, 0.25);
    animation: pd-modal-pop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes pd-modal-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pd-modal-pop {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.pd-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 22px 24px 6px;
}

.pd-modal__title {
    font-family: "Playfair Display", Georgia, serif;
    font-size: 1.5rem;
    margin: 0;
}

.pd-modal__close {
    flex: none;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #141414;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.pd-modal__close:hover {
    background: rgba(255, 27, 130, 0.12);
    color: #ff1b82;
}

.pd-modal__body {
    padding: 8px 24px 26px;
}

/* ---------- Formulario ---------- */
.pd-auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.pd-auth-form.is-hidden {
    display: none;
}

.pd-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pd-label {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Todos los campos visibles del modal son obligatorios (igual que el asterisco
   de ui_label en los componentes originales). El honeypot usa .pd-hp, no .pd-label. */
.pd-label::after {
    content: " *";
    color: #ff1b82;
}

.pd-input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    font: inherit;
    color: #141414;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.pd-input::placeholder {
    color: rgba(20, 20, 20, 0.4);
}

.pd-input:focus {
    outline: none;
    border-color: #ff1b82;
    box-shadow: 0 0 0 3px rgba(255, 27, 130, 0.15);
}

.pd-field__helper {
    margin: 0;
    font-size: 0.72rem;
    opacity: 0.6;
    line-height: 1.4;
}

.pd-auth-intro {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    opacity: 0.8;
}

.pd-auth-btn {
    position: relative;
    margin-top: 4px;
    border: 0;
    border-radius: 999px;
    padding: 13px 20px;
    background: #ff1b82;
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s;
}

.pd-auth-btn:hover {
    background: #e00f6f;
}

.pd-auth-btn:disabled {
    cursor: progress;
    opacity: 0.8;
}

.pd-auth-btn__spinner {
    display: none;
}

.pd-auth-btn.is-loading .pd-auth-btn__label {
    display: none;
}

.pd-auth-btn.is-loading .pd-auth-btn__spinner {
    display: inline;
}

.pd-auth-foot {
    margin: 2px 0 0;
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.8;
}

.pd-auth-link {
    border: 0;
    background: none;
    padding: 0;
    font: inherit;
    font-weight: 600;
    color: #ff1b82;
    cursor: pointer;
    text-underline-offset: 2px;
}

.pd-auth-link:hover {
    text-decoration: underline;
}

.pd-field__row {
    display: flex;
    justify-content: flex-end;
    margin-top: 2px;
}

.pd-auth-link--muted {
    font-weight: 500;
    font-size: 0.78rem;
    color: rgba(20, 20, 20, 0.6);
}

.pd-auth-link--muted:hover {
    color: #ff1b82;
}

/* Mensajes (éxito / error) renderizados por pd-auth.js */
.pd-auth-msg {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pd-auth-msg__item {
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.85rem;
    line-height: 1.4;
    border: 1px solid;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.pd-auth-msg__item--error {
    border-color: rgba(220, 38, 38, 0.4);
    background: rgba(220, 38, 38, 0.08);
    color: #b91c1c;
}

.pd-auth-msg__item--success {
    border-color: rgba(22, 163, 74, 0.4);
    background: rgba(22, 163, 74, 0.08);
    color: #15803d;
}

/* Honeypot anti-bot: oculto fuera de pantalla. */
.pd-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
