/**
 * DSA Audit Sales — Stiluri CSS v2.0
 * Formular ID 26 — Evaluare Preliminară Conformitate de Mediu
 * Layout iPad 11" landscape: Stânga 60% întrebare | Dreapta 40% vizual
 */

/* ─── Reset & Wrapper general ─────────────────────────────────────────────── */
#gform_26 .gfield {
    margin-bottom: 20px;
}

/* ─── LAYOUT TWO-COLUMN (întrebare stânga + vizual dreapta) ──────────────── */
#gform_26 .gform_fields {
    display: grid !important;
    grid-template-columns: 60% 40%;
    grid-gap: 0 24px;
    align-items: start;
}

/* Câmpurile normale ocupă coloana stângă */
#gform_26 .gfield:not(.dsa-vizual-field):not(.dsa-scor-container) {
    grid-column: 1;
}

/* Câmpul vizual ocupă coloana dreaptă */
#gform_26 .dsa-vizual-field {
    grid-column: 2;
    grid-row: 1 / span 10;
    position: sticky;
    top: 20px;
}

/* Containerul scorului pe toată lățimea */
#gform_26 .dsa-scor-container {
    grid-column: 1 / -1;
}

/* Câmpuri text pe toată lățimea (Page 1) */
#gform_26 .gfield.gfield--width-full {
    grid-column: 1 / -1;
}

/* ─── Avertismente legale ────────────────────────────────────────────────── */
#gform_26 .avertisment-legal {
    background-color: #fffbeb;
    border-left: 4px solid #f59e0b;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 8px;
    font-size: 0.875em;
    color: #78350f;
    line-height: 1.55;
}

#gform_26 .avertisment-legal strong {
    color: #92400e;
    display: block;
    margin-bottom: 4px;
}

/* ─── Titluri secțiuni ───────────────────────────────────────────────────── */
#gform_26 .html-block {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-left: 4px solid #2563eb;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 6px;
}

#gform_26 .html-block p {
    margin: 0;
    font-size: 1.05em;
    color: #1e3a5f;
    font-weight: 600;
}

/* ─── CÂMPUL VIZUAL (imaginea din dreapta) ───────────────────────────────── */
#gform_26 .dsa-vizual-field .gfield_label {
    display: none;
}

.dsa-vizual-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dsa-vizual-img {
    width: 100%;
    height: auto;
    max-height: 320px;
    object-fit: cover;
    display: block;
    border-radius: 12px;
}

.dsa-vizual-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 30px;
    color: #94a3b8;
    min-height: 180px;
}

.dsa-vizual-placeholder span {
    font-size: 3em;
    opacity: 0.5;
}

.dsa-vizual-placeholder small {
    font-size: 0.8em;
    text-align: center;
    color: #cbd5e1;
}

/* ─── Radio buttons (stilizate ca butoane) ───────────────────────────────── */
#gform_26 .flex-radio .gfield_radio {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

#gform_26 .flex-radio .gfield_radio li {
    list-style: none;
    margin: 0;
}

#gform_26 .flex-radio .gfield_radio li label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px 18px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 500;
    transition: all 0.15s ease;
    white-space: nowrap;
    user-select: none;
}

#gform_26 .flex-radio .gfield_radio li label:hover {
    border-color: #3b82f6;
    background: #eff6ff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59,130,246,0.15);
}

#gform_26 .flex-radio .gfield_radio li input[type="radio"] {
    accent-color: #2563eb;
    width: 16px;
    height: 16px;
}

#gform_26 .flex-radio .gfield_radio li input[type="radio"]:checked + label,
#gform_26 .flex-radio .gfield_radio li input[type="radio"]:checked ~ label {
    border-color: #2563eb;
    background: #dbeafe;
    font-weight: 600;
    color: #1e40af;
    box-shadow: 0 2px 8px rgba(37,99,235,0.2);
}

/* Răspuns "Nu" / negativ — roșiatic */
#gform_26 .flex-radio .gfield_radio li input[type="radio"][value="Nu"]:checked ~ label,
#gform_26 .flex-radio .gfield_radio li input[type="radio"][value="Nu — nu am raportat"]:checked ~ label,
#gform_26 .flex-radio .gfield_radio li input[type="radio"][value="Nu este înregistrată"]:checked ~ label {
    border-color: #dc2626;
    background: #fef2f2;
    color: #991b1b;
}

/* Răspuns "Da" — verde */
#gform_26 .flex-radio .gfield_radio li input[type="radio"][value="Da"]:checked ~ label,
#gform_26 .flex-radio .gfield_radio li input[type="radio"][value="Da — autorizație valabilă"]:checked ~ label {
    border-color: #16a34a;
    background: #f0fdf4;
    color: #14532d;
}

/* ─── Checkbox-uri (Page 2, 3) ───────────────────────────────────────────── */
#gform_26 .gfield_checkbox {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 6px 14px;
    margin-top: 8px;
}

#gform_26 .gfield_checkbox li {
    list-style: none;
    margin: 0;
}

#gform_26 .gfield_checkbox li label {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 0.88em;
    cursor: pointer;
    transition: background 0.12s;
    border: 1px solid transparent;
}

#gform_26 .gfield_checkbox li label:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
}

#gform_26 .gfield_checkbox li input[type="checkbox"]:checked + label,
#gform_26 .gfield_checkbox li input[type="checkbox"]:checked ~ label {
    background: #dbeafe;
    color: #1e40af;
    font-weight: 600;
    border-color: #93c5fd;
}

#gform_26 .gfield_checkbox li input[type="checkbox"] {
    accent-color: #2563eb;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ─── Pagini sărite ──────────────────────────────────────────────────────── */
.dsa-page-skipped {
    display: none !important;
}

.dsa-step-skipped .gf_step_number {
    background: #e2e8f0 !important;
    color: #94a3b8 !important;
    text-decoration: line-through;
}

.dsa-step-skipped .gf_step_label {
    color: #94a3b8 !important;
    font-style: italic;
}

/* ─── Avertismente live (JS) ────────────────────────────────────────────── */
.dsa-avertisment-live {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-left: 4px solid #d97706;
    border-radius: 6px;
    padding: 12px 14px;
    font-size: 0.875em;
    color: #78350f;
    margin-top: 10px;
    animation: dsa-fade-in 0.2s ease;
}

.dsa-avertisment-live ul {
    margin: 6px 0 0 16px;
    padding: 0;
}

.dsa-ok-live {
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-left: 4px solid #16a34a;
    border-radius: 6px;
    padding: 12px 14px;
    font-size: 0.875em;
    color: #14532d;
    margin-top: 10px;
    animation: dsa-fade-in 0.2s ease;
}

@keyframes dsa-fade-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─── Scor conformitate (ultima pagină) ─────────────────────────────────── */
#dsa-live-score {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.dsa-scor-header h3 {
    margin: 0 0 4px;
    font-size: 1.25em;
    color: #1e3a5f;
}

.dsa-scor-subtitle {
    color: #64748b;
    font-size: 0.85em;
    margin: 0 0 20px;
}

.dsa-scor-gauge-wrap {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.dsa-scor-gauge {
    position: relative;
    width: 320px;
    height: 32px;
    background: #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    flex-shrink: 0;
}

.dsa-scor-fill {
    height: 100%;
    border-radius: 16px;
    transition: width 0.7s cubic-bezier(.4,0,.2,1), background-color 0.4s;
    width: 0%;
}

.dsa-fill-green  { background: linear-gradient(90deg, #4ade80, #16a34a); }
.dsa-fill-yellow { background: linear-gradient(90deg, #facc15, #d97706); }
.dsa-fill-orange { background: linear-gradient(90deg, #fb923c, #ea580c); }
.dsa-fill-red    { background: linear-gradient(90deg, #f87171, #dc2626); }

.dsa-scor-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 700;
    font-size: 0.92em;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.35);
    pointer-events: none;
    white-space: nowrap;
}

.dsa-scor-legend {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.79em;
    color: #475569;
}

.dsa-amenda-total {
    background: linear-gradient(135deg, #fff1f2, #ffe4e6);
    border: 1px solid #fecdd3;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9em;
}

.dsa-amenda-label { color: #9f1239; font-weight: 500; }

.dsa-amenda-value {
    font-weight: 700;
    font-size: 1.2em;
    color: #dc2626;
}

#dsa-nonconf-wrap h4 {
    margin: 0 0 12px;
    font-size: 1em;
    color: #1e3a5f;
}

.dsa-nonconf-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.84em;
    border-radius: 8px;
    overflow: hidden;
}

.dsa-nonconf-table thead tr {
    background: linear-gradient(135deg, #1e40af, #1d4ed8);
    color: #fff;
}

.dsa-nonconf-table th,
.dsa-nonconf-table td {
    padding: 9px 11px;
    border: 1px solid #dde1e7;
    text-align: left;
    vertical-align: top;
}

.dsa-nonconf-table th { font-weight: 600; letter-spacing: 0.02em; }
.dsa-nonconf-table tbody tr:nth-child(even) { background: #f8fafc; }
.dsa-nonconf-table tbody tr:hover { background: #eff6ff; }

.dsa-row-critic td:first-child { border-left: 4px solid #dc2626; }
.dsa-row-major  td:first-child { border-left: 4px solid #f59e0b; }
.dsa-row-minor  td:first-child { border-left: 4px solid #3b82f6; }

.dsa-amenda-cell {
    font-weight: 700;
    color: #dc2626;
    white-space: nowrap;
}

.dsa-conform-msg {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 1px solid #86efac;
    border-left: 4px solid #16a34a;
    border-radius: 8px;
    padding: 14px 18px;
    color: #14532d;
    font-size: 0.92em;
    margin-bottom: 14px;
}

.dsa-disclaimer {
    font-size: 0.75em;
    color: #94a3b8;
    border-top: 1px solid #e2e8f0;
    margin-top: 16px;
    padding-top: 12px;
    line-height: 1.5;
}

/* ─── Butoane navigare ───────────────────────────────────────────────────── */
#gform_26 .gform_next_button,
#gform_26 .gform_prev_button,
#gform_26 .gform_button {
    border-radius: 8px;
    padding: 11px 24px;
    font-weight: 600;
    font-size: 0.95em;
    cursor: pointer;
    transition: all 0.15s ease;
    letter-spacing: 0.01em;
}

#gform_26 .gform_next_button {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    border: none;
    box-shadow: 0 2px 8px rgba(37,99,235,0.3);
}

#gform_26 .gform_next_button:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    box-shadow: 0 4px 12px rgba(37,99,235,0.4);
    transform: translateY(-1px);
}

#gform_26 .gform_prev_button {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

#gform_26 .gform_prev_button:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
}

#gform_26 .gform_button {
    background: linear-gradient(135deg, #025939, #014d30);
    color: #fff;
    border: none;
    font-size: 1em;
    padding: 13px 30px;
    box-shadow: 0 2px 8px rgba(2,89,57,0.3);
}

#gform_26 .gform_button:hover {
    box-shadow: 0 4px 16px rgba(2,89,57,0.4);
    transform: translateY(-1px);
}

/* ─── Indicator pași (step bar) ─────────────────────────────────────────── */
#gform_26 .gf_step_active .gf_step_number {
    background: #2563eb !important;
    border-color: #2563eb !important;
}

#gform_26 .gf_step_completed .gf_step_number {
    background: #16a34a !important;
    border-color: #16a34a !important;
}

/* ─── Bară footer DSA ────────────────────────────────────────────────────── */
.dsa-footer-bar {
    background: linear-gradient(135deg, #025939, #014d30);
    color: rgba(255,255,255,0.7);
    font-size: 0.75em;
    padding: 10px 20px;
    text-align: center;
    border-radius: 0 0 8px 8px;
    margin-top: 8px;
}

.dsa-footer-bar strong {
    color: #fff;
}

/* ─── Responsive (mobile / tablete portrait) ─────────────────────────────── */
@media (max-width: 900px) {
    #gform_26 .gform_fields {
        grid-template-columns: 1fr !important;
    }

    #gform_26 .dsa-vizual-field {
        grid-column: 1;
        grid-row: auto;
        position: static;
        margin-bottom: 16px;
    }

    .dsa-scor-gauge {
        width: 100%;
    }

    .dsa-scor-gauge-wrap {
        flex-direction: column;
        align-items: flex-start;
    }

    .dsa-nonconf-table {
        font-size: 0.76em;
    }

    .dsa-nonconf-table th:nth-child(3),
    .dsa-nonconf-table td:nth-child(3) {
        display: none;
    }

    #gform_26 .flex-radio .gfield_radio {
        flex-direction: column;
    }

    #gform_26 .gfield_checkbox {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    #gform_26 .gform_next_button,
    #gform_26 .gform_prev_button,
    #gform_26 .gform_button {
        width: 100%;
        text-align: center;
    }
}
