/* =========================================
   PAGINA CONTACT & FORMULAR (FINAL)
   ========================================= */

/* --- LAYOUT PRINCIPAL --- */
.tm-contact-split {
    display: grid;
    grid-template-columns: 1fr 1.1fr; /* Formularul ușor mai lat */
    gap: 50px;
    align-items: start;
}

/* --- STÂNGA: INFO & HARTĂ --- */
.tm-info-block {
    margin-bottom: 25px;
}

.tm-info-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    margin-bottom: 6px;
    letter-spacing: 0.05em;
}

.tm-info-text {
    font-size: 15px;
    color: var(--tm-navy);
    line-height: 1.5;
}

.tm-info-text a {
    color: var(--tm-navy);
    text-decoration: none;
    transition: opacity 0.2s;
}

.tm-info-text a:hover {
    opacity: 0.8;
}

.tm-map-container {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    margin-top: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* --- DREAPTA: FORMULAR COMPACT --- */

/* Container Formular */
.tm-contact-form-wrap {
    background: #f8fafc;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

/* Resetare CF7 (scoatem spațiile automate) */
.tm-contact-form-wrap p {
    margin: 0;
    padding: 0;
}

.tm-row {
    margin-bottom: 12px;
}

/* Etichete (Labels) */
.tm-compact-label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--tm-navy);
    margin-bottom: 4px;
    line-height: 1;
}

/* Input-uri & Textarea */
.tm-contact-form-wrap input[type="text"],
.tm-contact-form-wrap input[type="email"],
.tm-contact-form-wrap textarea {
    width: 100%;
    padding: 8px 12px;
    font-size: 14px;
    color: #334155;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    box-shadow: none;
    height: auto;
    margin: 0;
    transition: border-color 0.2s;
}

.tm-contact-form-wrap textarea {
    height: 80px;
    resize: vertical;
}

/* Stare Focus */
.tm-contact-form-wrap input:focus,
.tm-contact-form-wrap textarea:focus {
    border-color: var(--tm-navy);
    outline: none;
}

/* Buton Trimite */
.tm-contact-form-wrap input[type="submit"] {
    background: var(--tm-navy);
    color: #fff;
    border: none;
    width: 100%;
    padding: 12px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.2s;
    -webkit-appearance: none; /* Fix pentru iPhone */
}

.tm-contact-form-wrap input[type="submit"]:hover {
    background: #163257;
}

/* --- GDPR SECTION (FIXED & CLEAN) --- */

.tm-gdpr-compact {
    margin: 15px 0;
}

/* Resetăm structura internă CF7 */
.tm-gdpr-compact .wpcf7-form-control-wrap,
.tm-gdpr-compact .wpcf7-list-item {
    display: block;
    margin: 0;
    padding: 0;
}

/* Aliniere Label cu Checkbox */
.tm-gdpr-compact label {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    width: 100%;
    margin: 0;
}

/* Textul GDPR */
.tm-gdpr-compact .wpcf7-list-item-label {
    font-size: 13px !important;
    line-height: 1.4;
    color: #64748b;
    font-weight: 400;
    padding-top: 2px;
}

/* Checkbox Customization (Override Theme Defaults) */
.tm-gdpr-compact input[type="checkbox"] {
    width: 16px !important;
    height: 16px !important;
    min-width: 16px;
    margin: 0 !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 3px !important;
    background-color: #fff !important;
    cursor: pointer;
    accent-color: var(--tm-navy);

    /* Critic: Resetează stilurile temei care strică afișarea */
    appearance: auto !important;
    -webkit-appearance: auto !important;
    box-shadow: none !important;
    float: none !important;
    position: static !important;
}

/* --- MESAJE CF7 (Erori / Succes) --- */
span.wpcf7-not-valid-tip {
    font-size: 11px;
    color: #dc2626;
    display: block;
    margin-top: 2px;
}

.wpcf7-response-output {
    font-size: 13px;
    padding: 10px !important;
    margin: 15px 0 0 !important;
    text-align: center;
    border-radius: 4px;
    border-width: 1px !important;
}

/* Ascundem spinner-ul de încărcare */
.wpcf7-spinner { display: none !important; }

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
    .tm-contact-split {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .tm-contact-form-wrap {
        padding: 20px;
    }
}