select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 3rem;
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3E%3C/svg%3E");
}

/* Specificitate mare pentru Checkbox & Radio */
body.wp-theme-hello-elementor.hello-elementor-default input[type=checkbox],
body.wp-theme-hello-elementor.hello-elementor-default input[type=radio]{
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding: 0;
    width: 1rem;
    height: 1rem;
    border-radius: 0;
    border: 1px solid var(--e-global-color-text);
    margin-right: 0.25rem;
}

body.wp-theme-hello-elementor.hello-elementor-default input[type=radio],
body.wp-theme-hello-elementor.hello-elementor-default input[type=radio]:focus,
body.wp-theme-hello-elementor.hello-elementor-default input[type=radio]:focus-visible{
    border-radius: 50%;
}

body.wp-theme-hello-elementor.hello-elementor-default input[type=checkbox]:checked,
body.wp-theme-hello-elementor.hello-elementor-default input[type=radio]:checked{
    background: var(--e-global-color-accent);
}

body.wp-theme-hello-elementor.hello-elementor-default input[type=checkbox]:checked{
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23000000' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3E");
    background-size: contain;
    background-position: 50% 50%;
}

.wpcf7-acceptance > .wpcf7-list-item{
    margin-left: 0;
}

.wpcf7-checkbox,
.wpcf7-radio{
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.wpcf7-checkbox .wpcf7-list-item,
.wpcf7-radio .wpcf7-list-item{
    margin: 0;
}


/* =========================================================
   STILIZARE COMPLETĂ FORMULAR (ALINIERE STÂNGA, BTN-SECONDARY & FLUIDITATE)
   ========================================================= */

/* 1. RESETARE PĂRINȚI ȘI GARANTARE LĂȚIME 100% */
.wpcf7,
.wpcf7-form,
body .custom-cf7-form,
body .custom-cf7-form *,
body .custom-cf7-form p {
    box-sizing: border-box !important;
}

.wpcf7,
.wpcf7-form {
    width: 100% !important;
    min-width: 100% !important;
    display: block !important;
}

body .custom-cf7-form p {
    width: 100% !important;
    display: contents !important;
}

body .custom-cf7-form {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 1.25rem !important;
    align-items: flex-start !important; /* Aliniere generală elemente la stânga */
}

/* 2. BUTOANE TOGGLE B2B / B2C (ALINIATE LA STÂNGA & FLUIDE PE TABLETĂ/MOBIL) */
body .custom-cf7-form .form-toggle-group {
    display: flex !important;
    flex-wrap: wrap !important; /* Permite trecerea pe rândul următor dacă spațiul este restrâns */
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    background-color: rgba(15, 23, 42, 0.6) !important;
    padding: 6px !important;
    border-radius: var(--Outer-radius-sm, 16px) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    margin: 0 0 0.5rem 0 !important;
    align-self: flex-start !important;
    width: fit-content !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

body .custom-cf7-form .btn-atom-toggle {
    flex: 1 1 auto !important; /* Redimensionare fluidă */
    text-align: center !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 6px var(--Btn-padding-x, clamp(1rem, 0.73rem + 1.36vw, 1.75rem)) !important;
    background-color: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(56, 189, 248, 0.2) !important;
    border-radius: var(--Outer-radius-sm, 16px) !important;
    color: var(--White, #ffffff) !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: background-color 0.3s ease-in-out, border-color 0.3s ease-in-out, padding 0.3s ease-in-out, color 0.3s ease-in-out !important;
    box-sizing: border-box !important;
}

body .custom-cf7-form .btn-atom-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-color: var(--Tertiary, #38bdf8) !important;
    color: var(--Tertiary, #38bdf8) !important;
}

body .custom-cf7-form .btn-atom-toggle.active {
    background-color: var(--Tertiary, #38bdf8) !important;
    border-color: var(--Tertiary, #38bdf8) !important;
    color: #020617 !important;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.3) !important;
}

/* Suprapunere completă pe mobil/tablete mici */
@media (max-width: 540px) {
    body .custom-cf7-form .form-toggle-group {
        width: 100% !important;
        flex-direction: column !important;
        gap: var(--Gap-2) !important;
    }
    
    body .custom-cf7-form .btn-atom-toggle {
        width: 100% !important;
    }
}

/* 3. STRUCTURĂ GRID & RÂNDURI (100% LĂȚIME) */
body .custom-cf7-form .form-row-2 {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
    width: 100% !important;
    min-width: 100% !important;
    align-items: end !important;
}

@media (min-width: 640px) {
    body .custom-cf7-form .form-row-2 {
        grid-template-columns: 1fr 1fr !important;
    }
}

body .custom-cf7-form .form-group {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    width: 100% !important;
    min-width: 100% !important;
    gap: 0.375rem !important;
    margin: 0 !important;
    padding: 0 !important;
}

body .custom-cf7-form .wpcf7-form-control-wrap,
body .custom-cf7-form #service-b2b-wrap,
body .custom-cf7-form #service-b2c-wrap,
body .custom-cf7-form #company-field-wrap {
    width: 100% !important;
    min-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
}

/* 4. UNIFORMIZARE CÂMPURI INPUT, SELECT, TEXTAREA */
body .custom-cf7-form label {
    font-size: 0.8125rem !important;
    font-weight: 500 !important;
    color: var(--Text-muted, #94a3b8) !important;
    display: block !important;
    margin-bottom: 0.375rem !important;
    height: 1.25rem !important;
    line-height: 1.25rem !important;
}

body .custom-cf7-form input[type="text"],
body .custom-cf7-form input[type="email"],
body .custom-cf7-form input[type="tel"],
body .custom-cf7-form select {
    width: 100% !important;
    min-width: 100% !important;
    height: 50px !important;
    line-height: 50px !important;
    background-color: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: var(--Outer-radius-sm, 16px) !important;
    padding: 0 1rem !important;
    font-size: 0.875rem !important;
    color: var(--White, #ffffff) !important;
    outline: none !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

body .custom-cf7-form select {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    padding-right: 2.5rem !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2338bdf8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 1rem center !important;
    background-size: 1.25rem !important;
    cursor: pointer !important;
}

body .custom-cf7-form select option {
    background-color: #0f172a !important;
    color: #ffffff !important;
    padding: 10px !important;
}

body .custom-cf7-form textarea {
    width: 100% !important;
    min-width: 100% !important;
    min-height: 120px !important;
    background-color: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: var(--Outer-radius-sm, 16px) !important;
    padding: 0.75rem 1rem !important;
    font-size: 0.875rem !important;
    color: var(--White, #ffffff) !important;
    outline: none !important;
    box-sizing: border-box !important;
}

body .custom-cf7-form input:focus,
body .custom-cf7-form select:focus,
body .custom-cf7-form textarea:focus {
    border-color: var(--Tertiary, #38bdf8) !important;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2) !important;
}

/* 5. BUTONUL DE SUBMIT (ALINIAT LA STÂNGA + REPLICĂ EXACTĂ .BTN-SECONDARY) */
body .custom-cf7-form .form-submit-wrap {
    text-align: left !important;
    display: flex !important;
    justify-content: flex-start !important;
    margin-top: 0.5rem !important;
    width: 100% !important;
}

body .custom-cf7-form input[type="submit"] {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 6px var(--Btn-padding-x, clamp(1rem, 0.73rem + 1.36vw, 1.75rem)) !important;
    background-color: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(56, 189, 248, 0.2) !important;
    border-radius: var(--Outer-radius-sm, 16px) !important;
    color: var(--White, #ffffff) !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: background-color 0.3s ease-in-out, border-color 0.3s ease-in-out, padding 0.3s ease-in-out, color 0.3s ease-in-out !important;
    width: auto !important;
    height: auto !important;
    box-shadow: none !important;
}

body .custom-cf7-form input[type="submit"]:hover,
body .custom-cf7-form input[type="submit"]:focus-visible,
body .custom-cf7-form input[type="submit"]:active {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-color: var(--Tertiary, #38bdf8) !important;
    color: var(--Tertiary, #38bdf8) !important;
}

/* Stare inițială implicită (B2B vizibil, B2C ascuns) */
body .custom-cf7-form #service-b2b-wrap {
    display: block !important;
}

body .custom-cf7-form #service-b2c-wrap {
    display: none !important;
}

/* =========================================================
   CORECȚIE DISTANȚĂ UNIFORMĂ LABEL -> INPUT (8PX / --Gap-2)
   ========================================================= */

/* 1. Anulăm alinierea la bază a rândurilor (previne distanțarea pe verticală) */
body .custom-cf7-form .form-row-2 {
    align-items: start !important;
}

/* 2. Uniformizăm toate grupurile de câmpuri (inclusiv wrapper-ele speciale) */
body .custom-cf7-form .form-group,
body .custom-cf7-form #service-b2b-wrap,
body .custom-cf7-form #service-b2c-wrap,
body .custom-cf7-form #company-field-wrap {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    gap: var(--Gap-2, 0.5rem) !important; /* Exactly 8px între label și input */
}

/* 3. Eliminăm înălțimile fixe și marginile vechi de pe etichete */
body .custom-cf7-form label {
    margin-bottom: 0 !important;
    height: auto !important;
    line-height: 1.2 !important;
}

/* 4. Ascundem tag-urile <br> generate automat de Contact Form 7 */
body .custom-cf7-form br {
    display: none !important;
}

/* =========================================================
   AJUSTARE DISTANȚE (GAP) PE MOBIL ȘI DESKTOP
   ========================================================= */

/* 1. Distanța dintre câmpurile formularului (rânduri principale) */
body .custom-cf7-form {
    gap: var(--Gap-3, 1rem) !important; /* Max 16px între secțiunile formularului */
}

/* 2. Distanța dintre coloanele/câmpurile din același rând */
body .custom-cf7-form .form-row-2 {
    gap: var(--Gap-3, 1rem) !important; /* 16px pe mobil și desktop */
}

/* 3. Distanța dintre Label și Input (exact 8px) */
body .custom-cf7-form .form-group {
    display: flex !important;
    flex-direction: column !important;
    gap: var(--Gap-2, 0.5rem) !important; /* 8px între label și input */
}

/* Resetare margin-bottom pe label pentru a nu dubla spațiul creat de gap */
body .custom-cf7-form label {
    margin-bottom: 0 !important;
    height: auto !important;
    line-height: 1.2 !important;
}

/* 4. Ajustare opțională pentru ecran mobil foarte îngust (sub 480px) */
@media (max-width: 480px) {
    body .custom-cf7-form {
        gap: var(--Gap-2, 0.5rem) !important; /* Reduce la 8px distanța între rânduri pe ecrane foarte mici */
    }
    
    body .custom-cf7-form .form-row-2 {
        gap: var(--Gap-2, 0.5rem) !important;
    }
}

/* Asigurare structură Flex pe wrap-urile dinamice B2B/B2C */
body .custom-cf7-form #company-field-wrap,
body .custom-cf7-form #service-b2b-wrap,
body .custom-cf7-form #service-b2c-wrap {
    flex-direction: column !important;
    gap: var(--Gap-2, 0.5rem) !important;
}

/* =========================================================
   FORCE BRAND COLORS - CONTACT FORM 7 RESPONSE OUTPUT
   ========================================================= */

/* Toate stările mesajului (Implicit, Trimis, Eroare) */
.wpcf7 .wpcf7-response-output,
.wpcf7 form.sent .wpcf7-response-output,
.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unspam .wpcf7-response-output,
.wpcf7 form.failed .wpcf7-response-output {
    font-family: 'Inter', sans-serif !important;
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
    padding: 1rem 1.25rem !important;
    margin: 1.5rem 0 !important;
    border-radius: 8px !important;
    background-color: #0F172A !important; /* Brand Dark / Container Background */
    color: #F6F7EB !important; /* Brand Text Color (Alb-crem) */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

/* Când mesajul este TRIMIS CU SUCCES (Contur Portocaliu Accent / Albastru) */
.wpcf7 form.sent .wpcf7-response-output {
    border: 1px solid #E88D53 !important; /* Brand Accent - Portocaliu */
    color: #F6F7EB !important; /* Text Alb-Crem vizibil pe fundal închis */
}

/* Când formularul are ERORI de completare (Contur Portocaliu Accent) */
.wpcf7 form.invalid .wpcf7-response-output {
    border: 1px solid #E88D53 !important;
    color: #E88D53 !important;
}

/* Textul de eroare sub fiecare câmp ("Please fill out this field") */
.wpcf7-not-valid-tip {
    font-family: 'Inter', sans-serif !important;
    color: #E88D53 !important; /* Brand Accent Portocaliu */
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    margin-top: 0.35rem !important;
}

/* Bordura pe câmpurile necompletate */
.wpcf7-not-valid {
    border-color: #E88D53 !important;
}

.wpcf7-list-item-label a {
    color: var(--White, #ffffff) !important;
}

.wpcf7-list-item-label a:hover {
    color: var(--Tertiary, #38bdf8) !important;
}

.wpcf7-list-item input[type="checkbox"]{
    width: 12px !important;
    height: 12px !important;
}