/* J1+J2: layout alatura-te centrat + campuri late (input cream) */
/* Stilizează formularul CF7 "Devino membru" pe paginile Alătură-te RO(246)+EN(277).
   Scoping pe .pda-alatura-page (clasă adăugată via body_class în inc/setup.php) —
   nu poate atinge altă pagină, independent de ID. */

/* --- Container centrat (rezolvă alinierea stânga/îngustă) --- */
.pda-alatura-page .wpcf7-form {
    max-width: 720px;
    margin: 0 auto;
    background: var(--pda-navy, #0A1F44);
    border: 1px solid var(--pda-line, rgba(245, 241, 232, 0.14));
    border-radius: 14px;
    padding: 2.5rem;
}

/* --- Rând de câmp (.pda-col există deja în template, fără CSS) --- */
.pda-alatura-page .pda-col {
    display: block;
    width: 100%;
    margin-bottom: 1.25rem;
}

/* Label = eyebrow mic deasupra inputului */
.pda-alatura-page .pda-col > label {
    display: block;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--pda-cream, #F5F1E8);
    line-height: 1.5;
}

/* Spacing curat între textul label și input (peste <br>-ul din template) */
.pda-alatura-page .pda-col .wpcf7-form-control-wrap {
    display: block;
    margin-top: 0.4rem;
}

/* --- Inputuri: late, uniforme --- */
.pda-alatura-page .wpcf7-text,
.pda-alatura-page .wpcf7-date,
.pda-alatura-page .wpcf7-email,
.pda-alatura-page .wpcf7-tel,
.pda-alatura-page .wpcf7-number,
.pda-alatura-page .wpcf7-select,
.pda-alatura-page .wpcf7-textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 0.75rem 1rem;
    background: var(--pda-cream, #F5F1E8);
    border: 1px solid var(--pda-cream3, #9C9789);
    border-radius: 8px;
    color: var(--pda-navy, #0A1F44);
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    line-height: 1.4;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.pda-alatura-page .wpcf7-form-control::placeholder {
    color: rgba(10, 31, 68, 0.45);
}

/* Select: ascunde săgeata nativă + chevron custom (cream3) */
.pda-alatura-page .wpcf7-select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    padding-right: 2.5rem;
    background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='12'%20height='8'%20viewBox='0%200%2012%208'%3E%3Cpath%20fill='none'%20stroke='%230A1F44'%20stroke-width='1.5'%20d='M1%201.5%206%206.5%2011%201.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 0.7rem;
}

.pda-alatura-page .wpcf7-textarea {
    min-height: 120px;
    resize: vertical;
}

/* Focus: accent auriu + glow subtil */
.pda-alatura-page .wpcf7-form-control:focus {
    outline: none;
    border-color: var(--pda-gold, #C0C5CE);
    box-shadow: 0 0 0 3px rgba(10, 31, 68, 0.12);
}

/* --- Declarații (acceptance decl-1..5) --- */
.pda-alatura-page .wpcf7-acceptance {
    display: block;
    margin-bottom: 0.75rem;
}
.pda-alatura-page .wpcf7-acceptance .wpcf7-list-item {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin: 0 0 0.6rem;
}
.pda-alatura-page .wpcf7-acceptance .wpcf7-list-item label {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    cursor: pointer;
}
/* checkbox-ul nu se întinde, aliniat cu prima linie de text */
.pda-alatura-page .wpcf7-acceptance input[type="checkbox"] {
    flex: 0 0 auto;
    width: 1.05rem;
    height: 1.05rem;
    margin-top: 0.15rem;
    accent-color: var(--pda-gold, #C0C5CE);
    cursor: pointer;
}
.pda-alatura-page .wpcf7-acceptance .wpcf7-list-item-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--pda-cream2, #D8D3C6);
}

/* --- Submit: buton PDA --- */
.pda-alatura-page .wpcf7-submit {
    display: block;
    width: 100%;
    margin-top: 1.5rem;
    padding: 1.1rem 1.5rem;
    background: var(--pda-gold, #C0C5CE);
    color: var(--pda-navyDD, #050F2A);
    border: none;
    border-radius: 10px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
}
.pda-alatura-page .wpcf7-submit:hover {
    background: var(--pda-goldL, #DDE0E6);
    transform: translateY(-2px);
}

/* --- Mesaje validare (lizibile pe navy) --- */
.pda-alatura-page .wpcf7-not-valid-tip {
    color: #E89A9A;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    margin-top: 0.3rem;
}
.pda-alatura-page .wpcf7-form .wpcf7-response-output {
    margin: 1.5rem 0 0;
    padding: 0.9rem 1.1rem;
    border-radius: 8px;
    border-width: 1px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    color: var(--pda-cream, #F5F1E8);
}
/* input invalid → bordură roșiatică */
.pda-alatura-page .wpcf7-not-valid {
    border-color: #E89A9A !important;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .pda-alatura-page .wpcf7-form {
        padding: 1.5rem 1rem;
    }
}

/* ==========================================================================
   J5 — Modal Statut & Program (prefix pda-sp-)
   Markup injectat în wp_footer (inc/alatura-modal.php), unic pe pagină —
   selectori fără scoping de pagină. Separat de .pda-modal al Echipei.
   ========================================================================== */

/* Overlay container — ascuns by default (hidden din markup); .is-open îl arată */
.pda-sp-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}
.pda-sp-modal[hidden] {
    display: none;
}
.pda-sp-modal.is-open {
    display: flex;
    animation: pda-sp-fade 280ms cubic-bezier(0.22, 1, 0.36, 1);
}
.pda-sp-modal.is-closing {
    animation: pda-sp-fade 200ms ease-in reverse forwards;
}

/* Fundal semi-transparent navy — închide la click (data-close) */
.pda-sp-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(5, 15, 42, 0.85); /* --pda-navyDD @ 85% */
    cursor: pointer;
}

/* Card cream cu scroll intern */
.pda-sp-modal__dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 720px;
    max-height: 85vh;
    overflow-y: auto;
    background: var(--pda-cream, #F5F1E8);
    color: var(--pda-navy, #0A1F44);
    border-radius: 14px;
    padding: 2.5rem 2rem;
    box-shadow: 0 30px 80px rgba(5, 15, 42, 0.5);
    animation: pda-sp-card-enter 280ms cubic-bezier(0.22, 1, 0.36, 1);
}
.pda-sp-modal.is-closing .pda-sp-modal__dialog {
    animation: pda-sp-card-exit 200ms ease-in forwards;
}

/* Buton închidere × în colț */
.pda-sp-modal__close {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: var(--pda-navy, #0A1F44);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    transition: opacity 200ms ease;
}
.pda-sp-modal__close:hover {
    opacity: 0.6;
}

/* Titlu Fraunces navy (lăsăm spațiu pentru × din dreapta) */
.pda-sp-modal__title {
    font-family: "Fraunces", "Times New Roman", serif;
    font-size: 1.6rem;
    font-weight: 600;
    line-height: 1.25;
    color: var(--pda-navy, #0A1F44);
    margin: 0 1.5rem 1.5rem 0;
}

/* Taburi */
.pda-sp-modal__tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid var(--pda-cream3, #9C9789);
    margin-bottom: 1.5rem;
}
.pda-sp-tab {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    padding: 0.6rem 1rem;
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(10, 31, 68, 0.5); /* navy translucid */
    cursor: pointer;
    transition: color 200ms ease, border-color 200ms ease;
}
.pda-sp-tab:hover {
    color: var(--pda-navy, #0A1F44);
}
.pda-sp-tab.is-active {
    color: var(--pda-navy, #0A1F44);
    border-bottom-color: var(--pda-navy, #0A1F44);
    font-weight: 600;
}

/* PDA_J5_PDF_BTN_v1 — link descărcare PDF, aliniat dreapta în bara de tab-uri */
.pda-sp-tabs__pdf {
    margin-left: auto;            /* împinge la dreapta în flex */
    align-self: center;
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
    padding: 0.6rem 0.5rem;
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    color: rgba(10, 31, 68, 0.6);
    transition: color 200ms ease;
}
.pda-sp-tabs__pdf:hover {
    color: var(--pda-navy, #0A1F44);
    text-decoration: underline;
}

/* Paneluri — doar cel activ vizibil */
.pda-sp-panel {
    display: none;
    color: var(--pda-navy, #0A1F44);
    line-height: 1.7;
}
.pda-sp-panel.is-active {
    display: block;
}

/* Conținut WYSIWYG lizibil (headinguri Fraunces) */
.pda-sp-panel > :first-child {
    margin-top: 0;
}
.pda-sp-panel h2,
.pda-sp-panel h3,
.pda-sp-panel h4 {
    font-family: "Fraunces", "Times New Roman", serif;
    color: var(--pda-navy, #0A1F44);
    line-height: 1.3;
    margin: 1.5rem 0 0.6rem;
}
.pda-sp-panel h2 { font-size: 1.4rem; }
.pda-sp-panel h3 { font-size: 1.2rem; }
.pda-sp-panel h4 { font-size: 1.05rem; }
.pda-sp-panel p {
    margin: 0 0 1rem;
}
.pda-sp-panel ul,
.pda-sp-panel ol {
    margin: 0 0 1rem 1.25rem;
    padding: 0;
}
.pda-sp-panel li {
    margin: 0 0 0.4rem;
}
.pda-sp-panel a {
    color: var(--pda-sky, #7B9BC8);
    text-decoration: underline;
}

/* Link declanșator în declarație (pe fundal navy → auriu vizibil) */
.pda-sp-trigger {
    color: var(--pda-gold, #C0C5CE);
    text-decoration: underline;
    cursor: pointer;
    transition: color 200ms ease;
}
.pda-sp-trigger:hover {
    color: var(--pda-goldL, #DDE0E6);
}

/* Blocare scroll body cât modalul e deschis */
body.pda-sp-modal-open {
    overflow: hidden;
}

/* Animații (consecvente cu modalul Echipei) */
@keyframes pda-sp-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes pda-sp-card-enter {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes pda-sp-card-exit {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to   { opacity: 0; transform: translateY(12px) scale(0.98); }
}

/* Respectă prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .pda-sp-modal.is-open,
    .pda-sp-modal.is-closing,
    .pda-sp-modal__dialog,
    .pda-sp-modal.is-closing .pda-sp-modal__dialog {
        animation: none;
    }
}
