/* ============================================================================
   Bear Travel - Custom Styles
   Built on Bootstrap 5.3 — only overrides and custom components here.
   ============================================================================ */

/* --- CSS Variables --- */
:root {
    --bt-gold: #D4A843;
    --bt-gold-light: #F5E6C4;
    --bt-gold-dark: #B8922E;
    --bt-slate: #2C3E50;
    --bt-slate-light: #34495E;
    --bt-blue: #3498DB;
    --bt-green: #27AE60;
    --bt-amber: #F39C12;
    --bt-red: #E74C3C;
    --bt-bg: #F5F6F8;
    --bt-card: #FFFFFF;
    --bt-radius: 12px;
    --bt-shadow: 0 2px 12px rgba(0,0,0,0.06);
    --bt-shadow-hover: 0 4px 20px rgba(0,0,0,0.10);
    --bt-font: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --bt-font-display: 'Playfair Display', Georgia, serif;
    --bt-transition: 0.2s ease;
}

/* --- Base --- */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--bt-font);
    background-color: var(--bt-bg);
    color: var(--bt-slate);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

/* --- Desktop Navbar --- */
.bt-navbar {
    background: var(--bt-slate);
    border-bottom: 3px solid var(--bt-gold);
    padding: 0.4rem 0;
    z-index: 1040;
}

.bt-navbar .bt-brand {
    font-family: var(--bt-font-display);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--bt-gold) !important;
    letter-spacing: -0.01em;
    text-decoration: none;
}

.bt-navbar .bt-brand i {
    font-size: 1.1rem;
}

.bt-navbar .nav-link {
    color: rgba(255,255,255,0.75) !important;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.6rem 0.9rem !important;
    border-radius: 8px;
    transition: all var(--bt-transition);
    margin: 0 2px;
}

.bt-navbar .nav-link:hover {
    color: #fff !important;
    background: rgba(255,255,255,0.08);
}

.bt-navbar .nav-link.active {
    color: var(--bt-gold) !important;
    background: rgba(212, 168, 67, 0.12);
}

.bt-navbar .nav-link i {
    margin-right: 4px;
    font-size: 0.95em;
}

/* Add Booking Button */
.bt-btn-add {
    background: var(--bt-gold) !important;
    color: var(--bt-slate) !important;
    font-weight: 600;
    font-size: 0.85rem;
    border: none;
    border-radius: 8px;
    padding: 0.45rem 1rem;
    transition: all var(--bt-transition);
}

.bt-btn-add:hover {
    background: var(--bt-gold-dark) !important;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(212, 168, 67, 0.35);
}

/* User Menu */
.bt-user-menu {
    color: rgba(255,255,255,0.75) !important;
    font-size: 0.9rem;
    text-decoration: none;
}

.bt-user-menu:hover {
    color: #fff !important;
}

.bt-dropdown {
    border: none;
    border-radius: var(--bt-radius);
    box-shadow: var(--bt-shadow-hover);
    padding: 0.5rem;
    margin-top: 0.5rem;
}

.bt-dropdown .dropdown-item {
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.bt-dropdown .dropdown-item i {
    margin-right: 8px;
    width: 1.1em;
    text-align: center;
}

.bt-dropdown .dropdown-item:hover {
    background: var(--bt-bg);
}

/* --- Mobile Nav --- */
.bt-navbar-mobile {
    background: var(--bt-slate);
    border-bottom: 3px solid var(--bt-gold);
    padding: 0.5rem 0;
    z-index: 1040;
}

.bt-navbar-mobile .bt-brand {
    font-family: var(--bt-font-display);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--bt-gold) !important;
    text-decoration: none;
}

.bt-btn-add-mobile {
    background: var(--bt-gold);
    color: var(--bt-slate);
    border: none;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all var(--bt-transition);
}

.bt-btn-add-mobile:hover {
    background: var(--bt-gold-dark);
    color: #fff;
}

.bt-user-menu-mobile {
    color: rgba(255,255,255,0.75);
    font-size: 1.3rem;
    text-decoration: none;
}

/* Mobile Bottom Tab Bar */
.bt-bottom-tabs {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #e0e0e0;
    z-index: 1030;
    padding: 0.3rem 0;
    padding-bottom: calc(0.3rem + env(safe-area-inset-bottom, 0px));
    display: flex !important;
    flex-direction: row !important;
}

.bt-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.35rem 0;
    color: #999;
    text-decoration: none;
    font-size: 0.65rem;
    font-weight: 500;
    transition: color var(--bt-transition);
}

.bt-tab i {
    font-size: 1.2rem;
    margin-bottom: 2px;
}

.bt-tab.active {
    color: var(--bt-gold-dark);
}

.bt-tab:hover {
    color: var(--bt-slate);
}

/* Main content padding */
.bt-main {
    flex: 1;
    padding-bottom: 1rem;
}

@media (max-width: 767.98px) {
    .bt-main {
        padding-bottom: 5rem; /* Space for bottom tabs */
    }
}

/* --- Footer --- */
.bt-footer {
    background: #fff;
    border-top: 1px solid #eee;
}

@media (max-width: 767.98px) {
    .bt-footer {
        margin-bottom: 3.5rem; /* Above bottom tabs */
    }
}

/* ============================================================================
   AUTH PAGES (Login, Password Reset, Sign Up)
   ============================================================================ */

.bt-auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, var(--bt-slate) 0%, var(--bt-slate-light) 50%, #4a6741 100%);
}

.bt-auth-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.bt-auth-card {
    background: var(--bt-card);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 420px;
    padding: 2.5rem 2rem;
    position: relative;
    overflow: hidden;
}

.bt-auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--bt-gold), var(--bt-gold-dark));
}

.bt-auth-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.bt-auth-logo i {
    font-size: 2.2rem;
    color: var(--bt-gold);
}

.bt-auth-logo h1 {
    font-family: var(--bt-font-display);
    font-size: 1.6rem;
    color: var(--bt-slate);
    margin: 0.4rem 0 0;
    font-weight: 700;
}

.bt-auth-logo p {
    color: #888;
    font-size: 0.85rem;
    margin: 0.2rem 0 0;
}

/* Auth Form Elements */
.bt-auth-card .form-label {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #666;
    margin-bottom: 0.3rem;
}

.bt-auth-card .form-control {
    border-radius: 10px;
    padding: 0.65rem 0.9rem;
    font-size: 0.95rem;
    border: 1.5px solid #e0e0e0;
    transition: border-color var(--bt-transition), box-shadow var(--bt-transition);
}

.bt-auth-card .form-control:focus {
    border-color: var(--bt-gold);
    box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.15);
}

.bt-auth-btn {
    background: var(--bt-slate);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 0.7rem;
    font-size: 0.95rem;
    font-weight: 600;
    width: 100%;
    transition: all var(--bt-transition);
    cursor: pointer;
}

.bt-auth-btn:hover {
    background: var(--bt-slate-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.3);
}

.bt-auth-btn:disabled {
    opacity: 0.6;
    transform: none;
    box-shadow: none;
}

.bt-auth-links {
    text-align: center;
    margin-top: 1.2rem;
    font-size: 0.85rem;
}

.bt-auth-links a {
    color: var(--bt-blue);
    text-decoration: none;
    font-weight: 500;
}

.bt-auth-links a:hover {
    text-decoration: underline;
}

.bt-auth-footer {
    text-align: center;
    padding: 1rem;
    color: rgba(255,255,255,0.5);
    font-size: 0.8rem;
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

.bt-card {
    background: var(--bt-card);
    border-radius: var(--bt-radius);
    box-shadow: var(--bt-shadow);
    border: none;
    transition: box-shadow var(--bt-transition);
}

.bt-card:hover {
    box-shadow: var(--bt-shadow-hover);
}

/* Journey type color accents */
.bt-type-flight  { border-left: 4px solid var(--bt-blue); }
.bt-type-hotel   { border-left: 4px solid var(--bt-amber); }
.bt-type-car     { border-left: 4px solid var(--bt-green); }
.bt-type-train   { border-left: 4px solid #8E44AD; }
.bt-type-ship    { border-left: 4px solid #2980B9; }
.bt-type-restaurant { border-left: 4px solid var(--bt-red); }

/* Page titles */
.bt-page-title {
    font-family: var(--bt-font-display);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--bt-slate);
    margin: 1.5rem 0 1rem;
}

@media (min-width: 768px) {
    .bt-page-title {
        font-size: 1.75rem;
    }
}

/* Sub-navigation pills (replaces colored sub-bars) */
.bt-sub-nav {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.bt-sub-nav .btn {
    font-size: 0.82rem;
    font-weight: 500;
    border-radius: 20px;
    padding: 0.35rem 0.9rem;
}

.bt-pill-active {
    background: var(--bt-slate) !important;
    color: #fff !important;
    border-color: var(--bt-slate) !important;
}

/* ============================================================================
   DASHBOARD - Next Journey Card
   ============================================================================ */

/* Airport names & links in the dark header */
.bt-airport-name {
    font-size: 0.7rem;
    opacity: 0.8;
    line-height: 1.3;
}

.bt-airport-link {
    font-size: 0.7rem;
    color: var(--bt-gold) !important;
    text-decoration: none;
}

.bt-airport-link:hover {
    text-decoration: underline;
}

/* On larger screens, make airport codes bigger */
@media (min-width: 768px) {
    .bt-airport-name { font-size: 0.8rem; }
    .bt-airport-link { font-size: 0.78rem; }
}

/* ============================================================================
   DASHBOARD - Booking List (replaces table-based layout)
   ============================================================================ */

.bt-booking-list {
    display: flex;
    flex-direction: column;
}

.bt-booking-row {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
    color: var(--bt-slate);
    font-size: 0.85rem;
    transition: background var(--bt-transition);
    flex-wrap: wrap;
}

.bt-booking-row:last-child {
    border-bottom: none;
}

.bt-booking-row:hover {
    background: var(--bt-bg);
    color: var(--bt-slate);
}

.bt-booking-date {
    flex-shrink: 0;
    width: 90px;
    font-size: 0.8rem;
    color: #666;
}

.bt-booking-badge {
    flex-shrink: 0;
}

.bt-booking-detail {
    flex: 1;
    min-width: 0;
}

.bt-booking-meta {
    flex-shrink: 0;
    font-size: 0.78rem;
    color: #888;
}

/* On narrow screens, let meta wrap to next line */
@media (max-width: 575.98px) {
    .bt-booking-date {
        width: 75px;
        font-size: 0.75rem;
    }
    .bt-booking-meta {
        width: 100%;
        padding-left: calc(75px + 0.5rem + 28px + 0.5rem); /* date + gap + badge + gap */
        margin-top: -0.2rem;
    }
}

/* ============================================================================
   PROFILE FORMS
   ============================================================================ */

/* Form labels — uppercase style for in-app forms */
.bt-form-label {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #666;
    margin-bottom: 0.3rem;
}

/* Form controls inside cards — gold focus ring, consistent borders */
.bt-card .form-control,
.bt-card .form-select {
    border-radius: 10px;
    padding: 0.55rem 0.9rem;
    font-size: 0.92rem;
    border: 1.5px solid #e0e0e0;
    transition: border-color var(--bt-transition), box-shadow var(--bt-transition);
}

.bt-card .form-control:focus,
.bt-card .form-select:focus {
    border-color: var(--bt-gold);
    box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.15);
}

/* Save button — slate style matching auth buttons */
.bt-btn-save {
    background: var(--bt-slate);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 0.6rem 2rem;
    font-size: 0.92rem;
    font-weight: 600;
    transition: all var(--bt-transition);
    cursor: pointer;
}

.bt-btn-save:hover {
    background: var(--bt-slate-light);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.3);
}

.bt-btn-save:disabled {
    opacity: 0.6;
    transform: none;
    box-shadow: none;
}

/* Gold toggle color for checked switches */
.bt-card .form-check-input:checked {
    background-color: var(--bt-gold);
    border-color: var(--bt-gold);
}

.bt-card .form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.15);
    border-color: var(--bt-gold);
}

/* Card section titles */
.bt-card-title {
    font-family: var(--bt-font-display);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--bt-slate);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f0f0f0;
}

/* Remove button for friend rows */
.bt-btn-remove {
    background: transparent;
    color: var(--bt-red);
    border: 1.5px solid var(--bt-red);
    border-radius: 8px;
    padding: 0.25rem 0.6rem;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all var(--bt-transition);
    cursor: pointer;
}

.bt-btn-remove:hover {
    background: var(--bt-red);
    color: #fff;
}

/* Disabled / coming-soon card overlay */
.bt-card-disabled {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

/* Friend list rows */
.bt-friend-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.bt-friend-row:last-child {
    border-bottom: none;
}

/* Program slot compact rows */
.bt-program-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.bt-program-row:last-child {
    border-bottom: none;
}

/* ============================================================================
   ADD BOOKING FORMS
   ============================================================================ */

/* Colored form header banners */
.bt-form-header {
    border-radius: var(--bt-radius) var(--bt-radius) 0 0;
    padding: 1.25rem 1.5rem;
    color: #fff;
}

.bt-form-header h4 {
    margin: 0;
    font-family: var(--bt-font-display);
    font-weight: 700;
    font-size: 1.15rem;
}

.bt-form-header p {
    margin: 0.25rem 0 0;
    opacity: 0.85;
    font-size: 0.85rem;
}

.bt-form-header-flight     { background: var(--bt-blue); }
.bt-form-header-hotel      { background: var(--bt-amber); }
.bt-form-header-train      { background: #8E44AD; }
.bt-form-header-car        { background: var(--bt-green); }
.bt-form-header-ship       { background: #2980B9; }
.bt-form-header-restaurant { background: var(--bt-red); }
.bt-form-header-other      { background: #555; }

/* Type selector cards */
.bt-type-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.bt-type-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12) !important;
}

/* Error list in forms */
.bt-form-errors {
    background: rgba(231, 76, 60, 0.08);
    border: 1.5px solid rgba(231, 76, 60, 0.3);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.88rem;
}

.bt-form-errors ul {
    margin: 0;
    padding-left: 1.2rem;
}

.bt-form-errors li {
    color: var(--bt-red);
}

/* Address autocomplete search input */
.bt-address-search {
    font-size: 1rem !important;
    padding: 0.7rem 0.9rem 0.7rem 2.4rem !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23999' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zm-5.242.656a5 5 0 1 1 0-10 5 5 0 0 1 0 10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 0.75rem center;
    background-size: 1rem;
}

/* Green validation panel for confirmed address */
.bt-address-validated {
    background: rgba(39, 174, 96, 0.08);
    border: 1.5px solid rgba(39, 174, 96, 0.3);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    margin-top: 0.75rem;
    font-size: 0.88rem;
    color: var(--bt-slate);
}

.bt-address-validated i {
    color: var(--bt-green);
}

.bt-address-validated .bt-address-coords {
    font-size: 0.78rem;
    color: #888;
    margin-top: 0.25rem;
}
