/* ======================================
   BASE
====================================== */
body {
    margin: 0;
    padding: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: #eef2f7;
}

/* ======================================
   HEADER WITH LOGO & BACK BUTTON
====================================== */
.form-header {
    display: flex;
    align-items: center;
    padding: 20px 50px;
}

.back-btn {
    margin-right: auto;
    font-size: 18px;
    text-decoration: none;
    color: #0B3D91;
    font-weight: 700;
}

.form-logo {
    height: 70px;
}

/* ======================================
   TITLE
====================================== */
.title {
    text-align: center;
    margin: 20px 0;
    font-size: 34px;
    font-weight: 700;
    color: #0B3D91;
}

/* ======================================
   FORM WRAPPER
====================================== */
form {
    width: 95%;
    max-width: 950px;
    margin: auto;
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.12);
}

/* ======================================
   BLOCK SECTIONS
====================================== */
.block {
    background: #f8fafc;
    border-left: 6px solid #0B3D91;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 45px;
    box-shadow: 0 1px 8px rgba(0,0,0,0.05);
}

.block h2 {
    font-size: 20px;
    color: #0B3D91;
    margin-bottom: 20px;
    font-weight: 700;
}

/* ======================================
   ROWS & COLUMNS (ALIGNED PROFESSIONAL)
====================================== */
.row {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
}

.col {
    flex: 0 1 auto;
    min-width: 0;
}

.col-2 {
    flex: 0 1 auto;
}

.col-auto {
    flex: 0 0 auto;
}

/* ======================================
   LABELS & INPUTS
====================================== */
label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
}

input, select {
    padding: 14px;
    border-radius: 8px;
    border: 1px solid #ccd4dd;
    background: white;
    font-size: 16px;
    width: auto;
}

/* Focus Effect */
input:focus, select:focus {
    border-color: #0B3D91;
    box-shadow: 0 0 6px rgba(11,61,145,0.25);
    outline: none;
}

/* ======================================
   FIXED FIELD WIDTHS (UNIFIED SYSTEM)
====================================== */
.w-15 { width: 150px; }
.w-20 { width: 200px; }
.w-25 { width: 250px; }
.w-30 { width: 300px; }
.w-zip { width: 80px; text-align:center; }
.w-phone { width: 160px; }
.w-date { width: 140px; }
.w-state { width: 60px; text-align:center; }
.w-yes { width: 70px; }
.w-address {
    width: 350px;
}
select.w-auto {
    width: auto;
    min-width: 170px;   /* suficiente para Foreign / International */
}
.w-prior {
    width: 80px;
}
/* Vehicle block width fixes */
.w-year {
    width: 90px; /* exacto para 4 dígitos */
}

.w-30 {
    width: 300px;
}

.w-25 {
    width: 250px;
}


/* ======================================
   DRIVER & VEHICLE BOXES
====================================== */
.driver-block, .vehicle-block {
    background: #ffffff;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #d0d7e1;
    margin-top: 15px;
    box-shadow: 0 1px 8px rgba(0,0,0,0.08);
    position: relative;
}

/* REMOVE BUTTON */
.remove-btn {
    position: absolute;
    right: 10px;
    top: 10px;
    background: #dc3545;
    color: #fff;
    border: none;
    padding: 7px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

/* ADD & SUBMIT BUTTONS */
.add-btn {
    background: #198754;
    color: white;
    padding: 14px 22px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 17px;
    font-weight: 600;
}

.submit-btn {
    padding: 14px 28px;
    font-size: 18px;
    background: #0B3D91;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    display: inline-block;   /* Para que se ajuste al texto */
    margin: 25px auto 0;     /* Para centrar */
}
.submit-container {
    text-align: center;
    margin-top: 20px;
}

/* ============================================
   MOBILE VERSION — FULL RESPONSIVE FIX
   Applies only when the screen is smaller than 768px
============================================ */
@media (max-width: 768px) {

    /* ----- General layout ----- */
    body {
        padding: 0;
        margin: 0;
    }

    form {
        width: 96% !important;
        padding: 20px !important;
        margin: auto !important;
    }

    .block {
        padding: 20px !important;
        border-left-width: 5px !important;
    }

    /* ----- Logo & Header ----- */
    .form-header {
        flex-direction: column;
        padding: 10px 20px !important;
        text-align: center;
    }

    .back-btn {
        margin-right: 0 !important;
        margin-bottom: 8px;
        font-size: 18px !important;
    }

    .form-logo {
        height: 60px !important;
    }

    /* ----- Title ----- */
    .title {
        margin: 15px 0 !important;
        font-size: 26px !important;
        padding: 0 10px;
    }

    /* ----- ROW FIX: Each field becomes full width ----- */
    .row {
        flex-direction: column !important;
        gap: 12px !important;
        width: 100%;
        margin: 0;
    }

    /* Force columns to take full width */
    .col,
    .col-2 {
        width: 100% !important;
        flex: none !important;
        min-width: 100% !important;
    }

    /* ----- Inputs ----- */
    input,
    select {
        width: 100% !important;
        font-size: 16px !important;
        padding: 14px !important;
        border-radius: 8px !important;
    }

    label {
        font-size: 15px !important;
        margin-bottom: 4px !important;
    }

    /* ----- Blocks for Drivers & Vehicles ----- */
    .driver-block,
    .vehicle-block {
        padding: 15px !important;
        border-radius: 10px !important;
    }

    .remove-btn {
        top: 10px !important;
        right: 10px !important;
        padding: 8px 14px !important;
        font-size: 14px !important;
    }

    /* ----- Buttons ----- */
    .add-btn,
    .submit-btn {
        width: 100% !important;
        margin-top: 12px !important;
        font-size: 18px !important;
        padding: 16px !important;
    }

    /* ----- Fix ZIP, City, State row spacing ----- */
    .w-5,
    .w-year,
    .state-fixed {
        width: 100% !important;
        text-align: left !important;
    }
}
