* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
}

.formContainer {
    max-width: 80vw;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    padding: 1rem;
    margin: 2vh auto;
    min-height: 400px;
}

.boxcontainer {
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    gap: 1rem;
    margin: 10px auto;
}

.receiptContainer {
    display: none;
    padding: 2rem;
    min-height: 400px;
    margin: auto;
    max-width: 80vw;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    font-family: Helvetica Neue;
    font-size: small;
}

header {
    padding: 20px 10px;
    width: 100%;
    left: 0;
    top: 0;
    right: 0;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 300;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.travel-form {
    padding: 0px 30px 30px 30px
}

.form-section {
    margin-bottom: 40px;
}

.form-section h2 {
    color: #333;
    font-size: 1.5rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

.form-group input:valid {
    border-color: #28a745;
}

.form-group input:invalid:not(:focus):not(:placeholder-shown) {
    border-color: #dc3545;
}

/* Error Messages */
.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 5px;
    display: none;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(79, 172, 254, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* Booking Summary */
.booking-summary {
    padding: 40px 30px;
    background: #f8f9fa;
    border-top: 1px solid #e1e5e9;
}

.booking-summary h2 {
    color: #333;
    margin-bottom: 25px;
    font-size: 1.8rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #dee2e6;
}

.summary-item:last-child {
    border-bottom: none;
    font-weight: bold;
    font-size: 1.1rem;
    color: #4facfe;
}

.summary-label {
    font-weight: 500;
    color: #555;
}

.summary-value {
    color: #333;
}

/* Error Messages */
.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 5px;
    display: none;
}

.form-group.error .error-message {
    display: block;
}

.form-group.error input,
.form-group.error select {
    border-color: #dc3545;
}

/* Success Message */
.success-message {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
}

/* Form Actions */
.form-actions {
    .success-message {
        background: #d4edda;
        color: #155724;
        padding: 15px;
        border-radius: 8px;
        margin-bottom: 20px;
        border: 1px solid #c3e6cb;
    }

    /* Responsive Design */
    @media (max-width: 1024px) {
        .formContainer {
            max-width: 90vw;
            padding: 1.5rem;
        }

        .boxcontainer {
            padding: 0 15px;
            gap: 1.5rem;
        }

        .receiptContainer {
            max-width: 90vw;
        }
    }

    @media (max-width: 768px) {
        .formContainer {
            max-width: 95vw;
            padding: 1rem;
            margin: 1vh auto;
            border-radius: 10px;
        }

        .boxcontainer {
            flex-direction: column;
            align-items: center;
            gap: 1rem;
            padding: 0 10px;
        }

        .receiptContainer {
            max-width: 95vw;
            padding: 1.5rem;
            border-radius: 10px;
        }

        .container {
            margin: 10px;
            border-radius: 10px;
        }

        header {
            padding: 30px 20px;
        }

        header h1 {
            font-size: 2rem;
        }

        .travel-form {
            padding: 30px 20px;
        }

        .form-row {
            flex-direction: column;
            gap: 0.5rem;
        }

        .form-group {
            width: 100%;
        }

        .form-actions {
            flex-direction: column;
        }

        .btn {
            width: 100%;
        }

        input,
        select,
        button {
            font-size: 16px;
            /* Prevents zoom on iOS */
        }

        h2 {
            font-size: 1.5rem;
            text-align: center;
        }
    }

    @media (max-width: 480px) {
        .formContainer {
            max-width: 98vw;
            padding: 0.75rem;
            margin: 0.5vh auto;
            border-radius: 8px;
        }

        .receiptContainer {
            max-width: 98vw;
            padding: 1rem;
            border-radius: 8px;
        }

        body {
            padding: 10px;
        }

        header h1 {
            font-size: 1.8rem;
        }

        .travel-form {
            padding: 20px 15px;
        }

        .form-row {
            gap: 0.25rem;
        }

        .form-group label {
            font-size: 0.9rem;
            margin-bottom: 0.25rem;
        }

        .form-group input,
        .form-group select {
            padding: 0.5rem;
            font-size: 16px;
        }

        button {
            padding: 0.75rem 1rem;
            font-size: 0.9rem;
        }

        h2 {
            font-size: 1.25rem;
            margin-bottom: 1rem;
        }

        .timeline-container {
            margin: 1rem 0;
        }
    }

    @media (max-width: 320px) {
        .formContainer {
            max-width: 100vw;
            padding: 0.5rem;
            margin: 0;
            border-radius: 0;
        }

        .receiptContainer {
            max-width: 100vw;
            padding: 0.75rem;
            border-radius: 0;
        }

        h2 {
            font-size: 1.1rem;
        }

        .form-group label {
            font-size: 0.85rem;
        }
    }

    /* Loading Animation */
    .loading {
        opacity: 0.6;
        pointer-events: none;
    }

    .btn.loading::after {
        content: '';
        width: 16px;
        height: 16px;
        margin-left: 10px;
        border: 2px solid transparent;
        border-top: 2px solid currentColor;
        border-radius: 50%;
        display: inline-block;
        animation: spin 1s linear infinite;
    }

    @keyframes spin {
        0% {
            transform: rotate(0deg);
        }

        100% {
            transform: rotate(360deg);
        }
    }
}

.r-align {
    text-align: right;
    margin-top: -20px;
}

.line {
    background: #b1b1b1;
    height: 1px;
}

.receipt-text {
    font-size: large;
    margin: 20px 0;
}

.mbottom-20px {
    margin-bottom: 20px;
}

.mbottom-10mm {
    margin-bottom: 10mm !important;
}


.mbottom-40px {
    margin-bottom: 40px;
}

.m20px {
    margin-bottom: 20px;
    margin-top: 20px;
}

.text-color-subtext {
    color: #676363;
}

.text-color-green {
    color: #28a745;
}

.fare-table {
    width: 100%;
    border-collapse: collapse;
}

.trip-line-spacing {
    line-height: 2;
}

.timeline-item {
    position: relative;
    padding-left: 30px;
    margin-bottom: 15px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 5px;
    background-color: #333;
    border: 2px solid #333;
}

.timeline-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 4px;
    top: calc(50% + 3px);
    width: 2px;
    height: calc(100% + 16px);
    background-color: #333;
}

/* Print styles for A4 paper */
@media print {
    @page {
        margin: 0;
        size: A4;
    }

    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    body {
        margin: 0;
        padding: 0;
        background: white !important;
    }

    .formContainer {
        display: none !important;
    }

    .receiptContainer {
        display: block !important;
        margin: 0;
        padding: 15mm;
        max-width: 100%;
        width: 210mm;
        /* A4 width */
        min-height: 297mm;
        /* A4 height */
        background: white !important;
        border-radius: 0;
        box-shadow: none;
        font-size: small;
        page-break-inside: avoid;
        font-family: Helvetica Neue;
    }

    .receipt {
        width: 100%;
        max-width: 100%;
    }

    .brand {
        font-size: xx-large !important;
    }

    .receipt-text {
        font-size: large !important;
    }

    .fare {
        font-size: small !important;
    }

    .trip-line-spacing {
        line-height: 1.5 !important;
    }

    .timeline-item::before,
    .timeline-item::after {
        background-color: #000 !important;
    }

    .line {
        background: #000 !important;
        height: 1px;
    }

    /* Hide elements that shouldn't be printed */
    .form-actions,
    #newBooking {
        display: none !important;
    }

    .text-payment {
        font-size: large;
    }
}

.text-payment {
    font-size: large;
}

/* ---------- side-ads + main column layout ---------- */

/* Three-column layout */
.layout-grid {
    display: flex !important;
    justify-content: center;
    align-items: flex-start;
    margin: 20px;
    gap: 20px;
    padding: 20px;
    min-height: 100vh;
    background: #f7f7f8;
}

/* main column holds your boxcontainer */
.main-col .boxcontainer {
    width: 100% !important;
    /* override inline width:50% */
    margin: 0 auto;
}

/* ad column styling */
.ad-col {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 24px;
    min-height: 320px;
    /* space for tall ad like 160x600 */
}

/* hide side ads on small screens */
@media (max-width: 980px) {
    .layout-grid {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .ad-col {
        display: none;
    }
}

/* small tweak so your receipt container doesn't overflow */
.receiptContainer,
.formContainer {
    box-sizing: border-box;
}


/* ---------- end side-ads + main column layout ---------- */

/* styles.css */

/* Reset some default styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background: #f5f5f5;
    line-height: 1.5;
}

/* Ads (left and right) */
.ad-col {
    min-height: 600px;
    /* ensures content doesn't jump */
    background-color: #fff;
    padding: 10px;
    border: 1px solid #ddd;
    margin-bottom: 20px;
}

/* Center content (form and receipt) */
.boxcontainer {
    flex: 1;
    /* takes remaining space */
    max-width: 800px;
    /* optional: limit center width */
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Form styles */
.formContainer header {
    text-align: center;
    margin-bottom: 20px;
}

.form-section {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 10px;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Buttons */
.form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.btn {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.btn-primary {
    background-color: #007bff;
    color: #fff;
}

.btn-secondary {
    background-color: #6c757d;
    color: #fff;
}

/* Receipt container */
.receiptContainer {
    margin-top: 30px;
}

/* Make ads responsive for smaller screens */
@media (max-width: 1024px) {
    .layout-grid {
        flex-direction: column;
        align-items: center;
    }

    .ad-col {
        width: 100%;
        min-height: 120px;
        margin-bottom: 20px;
    }

    .boxcontainer {
        width: 100%;
        max-width: 800px;
    }
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 40px;
    flex-wrap: wrap;
    /* allows wrapping on smaller screens */
}

.form-actions .btn {
    flex: 1 1 auto;
    /* grow/shrink to fill available space */
    min-width: 120px;
    /* optional: prevent buttons from being too small */
}

/* Stack buttons on small screens */
@media (max-width: 768px) {
    .form-actions {
        flex-direction: column;
        gap: 10px;
    }

    .form-actions .btn {
        width: 100%;
    }
}
footer {

    padding: 20px 10px;
    width: 100%;
    left: 0;
    bottom: 0;
    right: 0;
}


.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    text-align: center;
}

.footer-section h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    font-weight: 300;
}

.footer-section h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    font-weight: 500;
}

.footer-section p {
    line-height: 1.6;
    opacity: 0.9;
    margin-bottom: 10px;
}

.footer-section a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

.footer-section a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Responsive footer */
@media (max-width: 768px) {
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .footer-section h3 {
        font-size: 1.3rem;
    }
    
    .footer-section h4 {
        font-size: 1.1rem;
    }
}


/* Give the ad column a visible width */
.ad-col.left-ad,
.ad-col.right-ad,
.ad-col.left-ad-2 {
  width: 160px;         
  min-height: 600px;
  flex: 0 0 160px;
  max-width: 100%;
  min-height: 600px;
}

.main-content {
    min-width: 65vw;
}

td, th {
    padding: 0 !important;
}

tr {
    border-bottom: none !important;
}

/* Force A4 page size */
@media print {
  @page {
    size: A4;
    margin: 0;
  }

  body {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    margin: 0;
    padding: 0;
  }

  .print-page {
    width: 210mm;
    min-height: 297mm;
    padding: 20mm;
    box-sizing: border-box;
  }

  /* Hide everything except the print section */
  body * {
    visibility: hidden;
  }

  .print-page, .print-page * {
    visibility: visible;
  }

  .print-page {
    position: absolute;
    left: 0;
    top: 0;
  }
}
