/* =========================================
   1. GLOBAL & THEME OVERRIDES
   ========================================= */

/* Hide default WordPress Page Titles to clean up the view */
h1.entry-title,
h1.page-title,
.wp-block-post-title,
header.entry-header h1, .page-title {
    display: none !important;
}
#veos-wizard-wrapper,
#veos-wizard-wrapper *,
#veos-wizard-wrapper *:before,
#veos-wizard-wrapper *:after {
    box-sizing: border-box;
}

#veos-wizard-wrapper {
    max-width: 960px;
    margin: 20px auto; /* Added top margin */
    font-family: Arial, sans-serif;
    position: relative;
    padding: 0 15px;
    overflow-x: hidden;
}
a {
    color: #22c0cb;
    text-decoration: none;
    background-color: transparent;
}
/* =========================================
   2. PROGRESS BAR
   ========================================= */
.veos-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    border-bottom: 2px solid #ddd;
}

.step-indicator {
    padding: 10px;
    color: #ccc;
    font-weight: bold;
    font-size: 14px;
    text-transform: uppercase;
}

.step-indicator.active {
    color: #00aaff;
    border-bottom: 3px solid #00aaff;
    margin-bottom: -2px; /* Overlaps the bottom border */
}

/* =========================================
   3. FORM LAYOUTS & INPUTS
   ========================================= */
.row {
    display: flex;
    gap: 20px;
}

.col-half {
    width: 50%;
}
.col-full {
    width: 100%;
}
/* CRITICAL: Relative positioning needed for absolute icon placement */
.form-group {
    margin-bottom: 15px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 14px;
}

/* Standard Inputs */
.form-control,
select:not(.ui-datepicker-month):not(.ui-datepicker-year),
input[type="text"],
input[type="date"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: .4em .5em;
    border: 1px solid #cbd5e0;
    border-radius: 3px;
    box-sizing: border-box; /* Ensures padding doesn't break width */
    font-size: 14px;
    margin-bottom: 5px;
}
input[type="text"][readonly], select[readonly]{
    background-color: #e9ecef;
    opacity: 1;
}
.d-flex{
    display: flex;
}
p.m-0 {
    margin: 0 !important;
}
/* =========================================
   4. DATEPICKER & ICON POSITIONING (FIXED)
   ========================================= */

/* Specific style for the Date of Birth Input */
.form-group input[id="veos_dob"] {
    display: block;
    width: 100%;
    /* Add padding on right so text doesn't slide under the calendar icon */
    padding-right: 45px;
    vertical-align: middle;
}

/* The Calendar Icon Image */
.ui-datepicker-trigger {
    cursor: pointer;
    width: 36px;
    height: auto;

    /* Absolute Positioning */
    position: absolute;
    right: 5px;        /* 5px from the right edge */
    top: 26px;         /* Pushes it down past the label to align with input */
    z-index: 10;
}

/* =========================================
   5. VALIDATION ERRORS
   ========================================= */
.input-error {
    border: 1px solid #dc3545 !important; /* Red border */
    background-color: #fff8f8;
}

span.error-msg {
    color: #dc3545;
    font-size: 12px;
    display: block;     /* Force it to a new line */
    width: 100%;
    margin-top: 5px;
    font-weight: normal;
}

/* =========================================
   6. BUTTONS & SECTIONS
   ========================================= */
.btn {
    padding: 10px 25px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.btn-primary { background-color: #00aaff; color: white; }
.btn-primary:hover { background-color: #008ecc; }

.btn-secondary { background-color: #666; color: white; }
.btn-secondary:hover { background-color: #555; }

.btn-success { background-color: #28a745; color: white; }
.btn-success:hover { background-color: #218838; }
.btn-danger {
    color: #fff;
    background-color: #dc3545;
    border-color: #dc3545;
}
.btn-danger:hover {
    color: #fff;
    background-color: #c82333;
    border-color: #bd2130;
}
.section-box {
    border: 1px solid #eee;
    padding: 20px;
    margin-bottom: 20px;
    background: #fff;
    border-radius: 5px;
}

.actions {
    margin-top: 20px;
    text-align: right;
    display: flex;
    justify-content: space-between; /* Keeps Back left and Next right */
}
.content-flex-end {
    justify-content: flex-end;
}
/* If there is only one button (Next), push it to the right */
.actions button:only-child {
    margin-left: auto;
}
.trip_info h2, .traveler_info h2, .in-page-title  {
    border-bottom: 2px solid #636361;
    color: #636361;
    /*float: left;*/
    font-size: 22px;
    margin: 0 0 20px;
    padding: 0 0 10px;
    width: 100%;
}

/* step Traveler info */
.traveler_info_header {
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 15px;
    border-bottom: 2px solid #636361;
    display: flex;
    justify-content: space-between;
}
.traveler_info_header .title{
    padding-left: 0;
}
.traveler_info_header .title h2 {
    margin: 0 0 8px;
}
#travelers_info .traveler{
    margin-bottom: 15px;
}
#travelers_info .service-item{
    display: inline-block;
    padding: 5px 10px 5px 0;
}
#travelers_info .service-item label {
    margin-left: 6px;
    display: inline-block;
}
div[id^="mat_"] .service-item label{
    margin-left: 4px;
}
a.btn-primary {
    text-decoration: none;
    text-align: center;
    max-width: 100%;
    box-sizing: border-box;
}
.have_info img{
    position: relative;
    background: #0075FF;
    border-radius: 50%;
    padding:2px;
    display: initial;
}
.have_info a{
    text-decoration: none;
    margin-left: 5px;
}

/** SERVICE */
.traveler_service{
    width: 100%;
}
.pp-renew{
    display: inline-flex;
}
.pp-renew label{
    display: contents;
}
.pp-renew input {
    margin-right: 10px;
}
.align-items-end {
    align-items: flex-end;
}
.item-name {
    display: block;
    font-size: 22px;
    width: 100%;
    padding-top: 15px;
    border-top: 1px solid;
}
.visa-input-block {
    margin-bottom: 18px;
    border-bottom: dashed thin #aaaaaa;
}
.delete-visa{
    padding: 20px 0;
}
.right-align, .text-md-right {
    text-align: right;
}
.title-traveler-name {
    background: none repeat scroll 0 0 #2FADE7;
    border-radius: 3px;
    color: #FFFFFF;
    display: block;
    font-size: 22px;
    margin: 0 0 9px 0;
    padding: 10px 0 10px 10px;
    width: 100%;
}
#step-3-services .main_all_div {
    margin-bottom:20px
}
div#more-visa {
    display: block;
    width: 100%;
    margin-bottom: 25px;
}
/** step payment */
.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.table{
    border-collapse: collapse;
    width: 100%;
    font-size: 14px;
}
.table .thead-dark th{
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    background-color: #2FADE7;
    border-color: #7F7F7F;
}
.table th, .table td{
    padding: 0.5rem;
    text-align: center;
}
.table-bordered th, .table-bordered td {
    border: 1px solid #dee2e6;
}
.sum_4{
    font-size: 16px;
}
small, .small {
    font-size: 60%;
    font-weight: 400;
}
.final-pay {
    font-size: 18px;
}
.text-center {
    text-align: center;
}
#term-agreement {
    margin-bottom: 20px;
}
#div_ship_u_v .col-md-4, #div_ship_v_u .col-md-4{
    margin-right:22px;
}
#div_ship_v_u select{
    max-width: 230px;
}
#ship-sign {
    line-height: 18px;
}
#ship-sign .col-md-8{
    width: 60%;
}
#ship-sign .col-md-4{
    width: 40%;
    display: inline-flex;
}
#ship-sign .m-r-25 {
    margin: 5px 25px 5px 0;
}
.card-text {
    font-size: 16px;
    margin: 15px 0;
}
/** summary */
#payment-acceptence {
    padding: 18px 0;
}
.justify-content-between {
    justify-content: space-between;
}
.img-fluid {
    max-width: 100%;
    height: auto;
}
#doc-lists .col-full {
    display: block;
}
#doc-lists .form-check {
    margin-left: 15px;
    position: relative;
    display: block;
    padding-left: 1.25rem;
}
.form-check-input {
    position: absolute;
    margin-top: 0.3rem;
    margin-left: -1.25rem;
}
.order_address {
    margin-bottom: 10px;
}
.order_address p {
    margin: 0px !important;
}
.contact-info, .shipping-info {
    padding: 10px 0;
    border-bottom: 1px solid #ccc;
    border-top: 1px solid #ccc;
}
.top-order-id span {
    margin-right: 20px;
}
h2.section-title {
    font-size: 24px;
}
p.top-order-id{
    margin: 0;
    font-size: 18px;
    font-weight: bold;
}
.order_address p{
    color: #000000;
    font-size: 16px;
    font-weight: bold;
    line-height: 20px;
    margin: 0;
}
h2.section-title{
    font-size: 22px;
    margin: 10px 0;
}
.row-header h2{
    font-size: 16px;
    font-weight: bold;
    color: #43C1E7;
}
div#payment-details{
    margin: 15px 0;
    font-size: 14px;
}
#payment-details .col-md-10 {
    width: 80%;
}
#payment-details .col-md-2 {
    width: 20%;
}
.payment-details-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}
.payment_summarydiv1{
    font-size: 16px;
}
#doc-lists {
    font-size: 16px;
}
.first, p.third, p.fourth, p.eigth, .first p {
    display: inline-block;
    padding: 5px 10px;
    font-weight: bold;
    margin: 0 !important;
}
p.fifth, p.second, p.sixth, p.seven{
    display: inline-block;
    padding: 5px 10px;
    margin: 0;
}
#order-summary-table table *{
    padding:0;
    border: 0;
    border-width: 0 !important;
}
/* =========================================
   8. MOBILE RESPONSIVE OVERRIDES (THE FIX)
   ========================================= */

@media (max-width: 768px) {
    /* Stack columns to full width */
    .row {
        flex-direction: column;
        gap: 0;
    }
    #payment-details .row {
        flex-direction: initial;
    }

    .col-half {
        width: 100%;
    }

    .veos-progress {
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .step-indicator {
        font-size: 12px;
        padding: 8px 5px;
        flex: 0 0 auto;
        text-align: center;
        white-space: nowrap;
    }

    /* Headings */
    .trip_info h2, .traveler_info h2, .title-traveler-name {
        font-size: 18px;
    }

    /* Traveler Header adjustments */
    .traveler_info_header {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Service items wrapping */
    #travelers_info .service-item {
        display: block;
        padding: 10px 0;
    }

    img {
        max-width: 100%;
        height: auto;
    }

    /* Wizard Box Padding */
    .section-box {
        padding: 15px;
    }
    #div_ship_u_v, #div_ship_v_u {
        display: block;
    }
    #div_ship_u_v .col-md-4, #div_ship_v_u .col-md-4{
        margin-right:0;
    }
    #div_ship_v_u select{
        max-width: 100%;
    }
    #ship-sign .col-md-8 {
        width: 100%;
    }
    #ship-sign .col-md-4 {
        width: 100%;
        display: block;
    }
}

@media (max-width: 480px) {
    .actions {
        flex-direction: column-reverse; /* Put 'Next' on top of 'Back' */
        gap: 10px;
    }

    .btn {
        width: 100%;
        display: block;
    }

    .step-indicator {
        font-size: 10px;
        padding: 5px;
    }

    .ui-datepicker-trigger {
        top: 26px;
    }
    #div_ship_u_v, #div_ship_v_u {
        display: block;
    }
    #div_ship_u_v .col-md-4, #div_ship_v_u .col-md-4{
        margin-right:0;
    }
    #div_ship_v_u select{
        max-width: 100%;
    }
}

@media print {
    header, footer { display: none; }
    nav { display: none; }
    .actions { display: none; }
    #order-success {display: none;}
    .row {display: block;gap: 0;}
    p{font-size: 14px;}
    .col-half {float: left;width: 50%;}
    .no-print {display: none;}
    .first, p.third, p.fourth, p.eigth, .first p{font-size: 14px;}
    h2, h3 {font-size: 18px !important;}
    #doc-lists {break-before: always;break-before: page;page-break-before: always;}
    #fedex-ship-label {break-inside: avoid;page-break-inside: avoid;display: block;clear: both;}
    #payment-details .row > div {display: block;float: left;}
    #order-summary-table table {margin-bottom: 5px}
    .table th, .table td {padding: 0}
}