/*
   SHARED BUTTON STYLES
   Reusable buttons across the whole website
*/

.primary-btn {
    display: inline-block;
    background-color: #d64545 !important;
    color: #ffffff !important;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    min-height: 48px;
    box-sizing: border-box;
    text-align: center;
    text-decoration: none;
    font-weight: 700;
    cursor: pointer;
}

.primary-btn:hover {
    background-color: #c63d3d !important;
    color: #ffffff !important;
}

.secondary-btn {
    display: inline-block;
    background-color: #1e3a5f !important;
    color: #ffffff !important;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    min-height: 48px;
    box-sizing: border-box;
    text-align: center;
    text-decoration: none;
    font-weight: 700;
    cursor: pointer;
}

.secondary-btn:hover {
    background-color: #2563eb !important;
    color: #ffffff !important;
}


/*
   TOP NAVIGATION BAR
   Header, logo, nav links, login/logout button
*/

.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 40px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.top-nav * {
    opacity: 1 !important;
}

.top-nav-title a {
    text-decoration: none;
    font-size: 2.8rem;
    font-weight: 700;
    color: #1e3a5f !important;
}

.top-nav-title a:hover {
    color: #2563eb !important;
}

.top-nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.top-nav-links a {
    text-decoration: none;
    color: #1e3a5f !important;
    font-weight: 600;
    font-size: 1.6rem;
}

.top-nav-links a:hover {
    color: #2563eb !important;
}

.top-nav-links a.nav-button {
    display: inline-block;
    background-color: #1e3a5f !important;
    color: #ffffff !important;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.6rem;
    line-height: 1.2;
}

.top-nav-links a.nav-button:hover {
    background-color: #2563eb !important;
    color: #ffffff !important;
}

/*
   GLOBAL SEARCH BAR
   Top search box on the homepage
*/
.global-search {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto 24px auto;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    box-sizing: border-box;
}

.global-search .search-form {
    width: 100%;
    margin: 0;
}

.global-search .search-row {
    display: flex;
    align-items: stretch;
    gap: 16px;
    width: 100%;
    flex-wrap: nowrap;
}

.global-search .search-input {
    flex: 1;
    min-width: 0;
    height: 56px;
    padding: 0 18px;
    border: 1px solid #d9dee5;
    border-radius: 16px;
    font-size: 1rem;
    outline: none;
    box-sizing: border-box;
    background: #ffffff;
    margin: 0;
}

.global-search .search-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.top-search-btn {
    height: 56px;
    padding: 0 32px;
    background-color: #d64545;
    color: #ffffff;
    border: none;
    border-radius: 16px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.top-search-btn:hover {
    background-color: #c63d3d;
}

/*
   HOMEPAGE BOOKING SECTION
   Booking card, tabs, form fields and search button
*/

.booking-card {
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.booking-tabs {
    display: flex;
}

.tab-btn {
    flex: 1;
    padding: 14px;
    border: none;
    background: #f3f4f6;
    color: #6b7280;
    font-weight: 700;
    cursor: pointer;
}

.tab-btn.active {
    background: #e74c3c;
    color: #ffffff;
}

.booking-card .tab-panel {
    background: #ffffff;
}

.booking-card .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 14px;
    padding: 18px 20px 5px;
    align-items: end;
}

.booking-card .form-group {
    margin: 0;
}

.booking-card .form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
    font-size: 0.95rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.booking-card .form-input {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    box-sizing: border-box;
    font-size: 1rem;
    background: #ffffff;
}

.booking-card .form-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.booking-card .swap-btn {
    display: none;
}

.booking-card .primary-btn,
.booking-card .search-btn {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-size: 1rem;
    margin-top: 8px;
}

/*
   ACCOUNT / PROFILE PAGE
   User profile card and edit button
*/

.account-page {
    padding: 1rem;
}

.account-card {
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.account-card h1 {
    margin-bottom: 0.5rem;
    color: #1e3a5f;
}

.account-subtitle {
    color: #5b6773;
    margin-bottom: 1.5rem;
}

.account-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.account-info {
    display: grid;
    gap: 1rem;
}

.account-info div {
    padding: 1rem;
    background: #f8fafc;
    border-radius: 10px;
}

.edit-btn {
    display: inline-block;
    background-color: #1e3a5f !important;
    color: #ffffff !important;
    padding: 10px 18px;
    border: none !important;
    outline: none;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.6rem;
    line-height: 1.2;
    cursor: pointer;
}

.edit-btn:hover {
    background-color: #2563eb !important;
    color: #ffffff !important;
}

/*
   FLIGHT RESULTS PAGE
   Flight result cards and pricing
*/

.flight-result-card {
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.flight-result-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.flight-result-price {
    font-size: 20px;
    font-weight: bold;
    color: #e74c3c;
}

/* ---------- Login page ---------- */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    background: #f3f4f6;
    margin: 0;
}

.login-page .container {
    max-width: 100% !important;
    width: 100%;
    padding: 0;
}

.login-page .container.login {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
}

.login-page .row {
    justify-content: center;
    margin: 0;
}

.login-page .column {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
}

.login-page .users.form.content {
    max-width: 420px;
    width: 100%;
    margin: 0 auto;
}

.login-page input {
    width: 100%;
    box-sizing: border-box;
}

/* ---------- Contact page ---------- */

.contact-page {
    padding-top: 2rem;
}

/* ---------- Register page ---------- */

.register-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    background: #f3f4f6;
}

.register-page .container {
    max-width: 100% !important;
    width: 100%;
    padding: 0;
}

.register-page .users.form.content {
    max-width: 520px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
    box-sizing: border-box;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    background: #ffffff;
}

.register-page legend {
    font-size: 2rem;
    font-weight: 700;
    color: #1e3a5f;
    margin-bottom: 1.5rem;
}

.register-page label {
    display: block;
    font-weight: 700;
    color: #5b6773;
    margin-bottom: 0.4rem;
}

.register-page .input {
    margin-bottom: 1.25rem;
}

.register-page input,
.register-page select,
.register-page textarea {
    width: 100%;
    box-sizing: border-box;
    border-radius: 10px;
    min-height: 48px;
}

.register-page .form-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.register-page .form-actions .button,
.register-page .form-actions button {
    width: 100%;
    min-height: 52px;
    border-radius: 10px;
    font-weight: 700;
    margin: 0;
}

@media (min-width: 992px) {
    .register-page .row.two-column {
        grid-template-columns: 1fr 1fr;
        column-gap: 1rem;
        row-gap: 0;
    }
}

/*
   MOBILE RESPONSIVE STYLES
   Adjust layout for smaller screens
*/

@media (max-width: 768px) {
    /* Top navigation becomes stacked */
    .top-nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        padding: 16px 20px;
    }

    .top-nav-links {
        flex-wrap: wrap;
        gap: 12px;
    }

    .top-nav-title a {
        font-size: 2.2rem;
    }

    /* Keep search row horizontal on mobile */
    .global-search {
        margin: 0 10px 20px 10px;
        width: auto;
    }

    .global-search .search-row {
        flex-direction: row;
        align-items: stretch;
        gap: 10px;
    }

    .global-search .search-input {
        flex: 1;
        min-width: 0;
        width: auto;
        height: 50px;
        font-size: 0.95rem;
        padding: 0 14px;
    }

    .top-search-btn {
        flex: 0 0 auto;
        width: auto;
        height: 50px;
        padding: 0 18px;
    }

    /* Booking card */
    .booking-card .form-row {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 18px;
    }

    .flight-result-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .booking-tabs {
        flex-direction: column;
    }

    .container {
        width: 100%;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    input,
    select,
    textarea,
    button,
    .button {
        width: 100%;
    }

    .login-page {
        padding: 1rem;
        align-items: center;
    }

    .login-page .container.login,
    .login-page .column,
    .login-page .users.form.content {
        max-width: 100%;
    }

    .login-page .users.form.content {
        padding: 1.5rem;
    }

    .login-page .users.form.content .button,
    .login-page .users.form.content button {
        width: 100%;
        margin-bottom: 1rem;
    }

    .login-page .users.form.content .button.button-outline,
    .login-page .users.form.content .button.button-clear {
        display: block;
        text-align: center;
    }

    .contact-page {
        padding-top: 1rem;
    }

    .register-page {
        padding: 1rem;
    }

    .register-page .users.form.content {
        max-width: 100%;
        width: 100%;
        margin: 0 auto;
        padding: 1.5rem;
        box-sizing: border-box;
        border-radius: 12px;
    }

    .register-page .row.two-column,
    .register-page .form-actions {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}
