/*
 * Centralized brand theme — the ONLY place brand colors are defined.
 * Change a value here and every button/link/badge/card across both the
 * customer site and the admin panel (Bootstrap-based) picks it up, because
 * this file is loaded LAST in both layouts and remaps Bootstrap's own
 * --bs-* variables in addition to defining our own tokens below.
 *
 * Palette: beige/white surfaces + a single yellow accent (#FFDB58) + black/grey
 * text (referenced against savaari.com's airy, whitespace-heavy layout, but
 * warmed up with beige instead of pure white so the site doesn't read as sterile).
 */
:root {
    --color-primary: #FFDB58;
    --color-primary-rgb: 255, 219, 88;
    --color-primary-light: #FFF6DD;
    --color-secondary: #1a1a1a;
    --color-background: #fff77724;
    --color-beige: #FBF5E9;
    --color-beige-deep: #F3E8D2;
    --color-surface: #ffffff;
    --color-surface-alt: #ffdb5824;
    --color-text: #1a1a1a;
    --color-muted-text: #6b7280;
    --color-success: #198754;
    --color-warning: #FFDB58;
    --color-danger: #dc3545;
    --color-border: #ECE0C8;
    --radius-md: 10px;
    --radius-sm: 6px;
    --shadow-soft: 0 2px 14px rgba(0, 0, 0, 0.06);
}

body {
    background-color: var(--color-background);
}

/*
 * The customer-facing template (public/user/assets/css/style.css) defines its
 * OWN --theme-color/--color-dark/etc. custom properties and uses them
 * everywhere via var(...) — no !important hardcoding like the admin template.
 * Aliasing them to our tokens here is enough to reskin the entire customer
 * site consistently from this one file.
 */
:root {
    --theme-color: var(--color-primary);
    --theme-bg-light: var(--color-surface-alt);
    --color-dark: var(--color-secondary);
    --color-yellow: var(--color-primary);
    --footer-bg: var(--color-secondary);
    --footer-bg2: #232323;
}

/* ---- Bootstrap variable remap (covers .btn-primary, .bg-primary, .text-primary, .badge-primary, links, etc.) ---- */
:root,
[data-bs-theme] {
    --bs-primary: var(--color-primary);
    --bs-primary-rgb: var(--color-primary-rgb);
    --bs-warning: var(--color-primary);
    --bs-warning-rgb: var(--color-primary-rgb);
    --bs-link-color: var(--color-secondary);
    --bs-link-color-rgb: 0, 0, 0;
    --bs-link-hover-color: var(--color-primary);
    --bs-body-color: var(--color-text);
    --bs-body-bg: var(--color-background);
    --bs-border-color: var(--color-border);
}

.btn-primary,
.btn-warning {
    --bs-btn-bg: var(--color-primary);
    --bs-btn-border-color: var(--color-primary);
    --bs-btn-hover-bg: var(--color-secondary);
    --bs-btn-hover-border-color: var(--color-secondary);
    --bs-btn-active-bg: var(--color-secondary);
    --bs-btn-active-border-color: var(--color-secondary);
    color: var(--color-secondary) !important;
}

.btn-primary:hover,
.btn-warning:hover {
    color: #fff !important;
}

/*
 * The Cork Admin template (public/backend/src/assets/css/light/main.css)
 * hardcodes .btn-primary/.btn-warning with `background-color: ... !important`,
 * which beats the --bs-btn-bg remap above regardless of load order (an
 * !important on the actual property always beats a custom property feeding
 * a non-important declaration elsewhere). Re-declaring with !important here
 * is the only way to make admin buttons actually pick up the brand palette.
 */
.btn-primary,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-warning,
.btn-warning:hover,
.btn-warning:focus,
.btn-warning:active {
    background-color: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
    color: var(--color-secondary) !important;
    box-shadow: none !important;
}

/* ---- Admin sidebar accent: swap the template's default blue for the brand palette ---- */
#sidebar ul.menu-categories li.menu ul.submenu>li a:hover,
#sidebar ul.menu-categories li.menu ul.submenu>li.active a,
#sidebar ul.menu-categories li.menu ul.submenu>li.active a:hover,
#sidebar ul.menu-categories ul.submenu>li a:hover,
#sidebar ul.menu-categories ul.submenu li>a[aria-expanded=true],
#sidebar ul.menu-categories ul.submenu>li ul.sub-submenu>li.active a,
#sidebar ul.menu-categories ul.submenu>li ul.sub-submenu>li a:hover {
    color: var(--color-secondary) !important;
    font-weight: 600;
}

#sidebar ul.menu-categories li.menu ul.submenu>li a:hover:before,
#sidebar ul.menu-categories li.menu ul.submenu>li.active a:hover:before,
#sidebar ul.menu-categories ul.submenu>li a:hover:before,
#sidebar ul.menu-categories ul.submenu li>a[aria-expanded=true]:before,
#sidebar ul.menu-categories ul.submenu>li ul.sub-submenu>li a:hover:before {
    background-color: var(--color-primary) !important;
    background: var(--color-primary) !important;
}

/* ---- DataTable pagination accent (covers both classic and v2 class names) ---- */
.paginate_button.current,
.paginate_button.current:hover,
.dt-paging-button.current,
.page-item.active .page-link {
    background: var(--color-secondary) !important;
    border-color: var(--color-secondary) !important;
    color: #fff !important;
}

.theme-btn {
    background-color: var(--color-primary);
    color: var(--color-secondary);
    border-color: var(--color-primary);
}

.theme-btn:hover {
    background-color: var(--color-secondary);
    color: #fff;
    border-color: var(--color-secondary);
}

/* ---- Seamless card/surface consistency across user + admin panels ---- */
.card,
.statbox,
.widget.box,
.booking-form,
.driver-card,
.price-breakdown {
    border-radius: var(--radius-md);
}

.statbox.box-shadow,
.widget.box.box-shadow {
    box-shadow: var(--shadow-soft) !important;
    border: 1px solid var(--color-border);
}

.btn,
.form-control,
.form-select {
    border-radius: var(--radius-sm);
}

/* ---- Booking status badges (used across My Bookings, Booking Details, Admin Booking list) ---- */
.status-badge,
.badge.status-pending_payment,
.badge.status-pending {
    background-color: var(--color-primary);
    color: var(--color-secondary);
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.status-confirmed,
.status-paid,
.status-trip_completed,
.status-verified,
.status-available,
.status-active {
    background-color: var(--color-success);
    color: #fff;
}

.status-driver_assignment_pending,
.status-driver_assigned,
.status-driver_accepted,
.status-driver_arriving,
.status-trip_started {
    background-color: var(--color-secondary);
    color: #fff;
}

.status-cancelled,
.status-rejected,
.status-no_show,
.status-failed,
.status-payment_failed,
.status-inactive {
    background-color: var(--color-danger);
    color: #fff;
}

.status-refunded,
.status-pending {
    background-color: var(--color-muted-text);
    color: #fff;
}

/* ---- Price breakdown table ---- */
.price-breakdown li span:first-child {
    color: var(--color-muted-text);
}

/* ---- Driver info card ---- */
.driver-card {
    border-left: 4px solid var(--color-primary);
}

/*
 * The template's .booking-area has margin-top:-70px so the search widget
 * overlaps the bottom of a hero banner image. book-ride.blade.php has no
 * hero above it, so that negative margin was clipping the "Book Your
 * Ride" title and the first row of trip-type tabs under the site header.
 * .book-ride is the page-level class the template already defines
 * (style.css "38. Book ride css") but was never applied — undo the
 * hero-overlap offset for this standalone page only.
 */
.book-ride .booking-area {
    margin-top: 40px;
}

@media (max-width: 767px) {
    .book-ride .booking-area {
        margin-top: 24px;
    }
}

/* ---- Mobile: keep primary actions visible without horizontal scrolling ---- */
@media (max-width: 767px) {
    .sticky-mobile-actions {
        position: sticky;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--color-surface);
        border-top: 1px solid var(--color-border);
        padding: 10px 16px;
        z-index: 1030;
    }
}

/*
 * "Our Best Services For You" (home page) — the template's .service-item
 * sizes purely to its own content (an absolutely-positioned ::before draws
 * the white card behind it), so four cards with differing copy lengths ended
 * up with a ragged, unequal bottom edge. Bootstrap's .row is already a flex
 * container with align-items:stretch, so stretching .service-item itself to
 * fill that stretched column height is all that's needed for every card in
 * a row to line up — the ::before background then naturally matches since
 * it's pinned to the parent's own top/bottom.
 */
.service-area [class*="col-"] {
    display: flex;
    justify-content: space-evenly;
}

.service-item {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.service-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.service-text {
    font-size: 14.5px;
    line-height: 1.7;
}

.service-arrow {
    margin-top: auto;
    padding-top: 10px;
}

.service-arrow a.service-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 14px;
    color: var(--color-secondary);
    transition: var(--transition2, all .3s ease-in-out);
}

.service-arrow a.service-more i {
    transition: transform .25s ease-in-out;
}

.service-arrow a.service-more:hover {
    color: var(--color-primary);
}

.service-arrow a.service-more:hover i {
    transform: translateX(4px);
}

/*
 * Section heading + About Us polish. style.css resets "p { margin: 0px; }"
 * globally, so the two .about-text paragraphs ran together with no gap —
 * and .site-title is a fixed 45px at every viewport (no responsive rule
 * anywhere in style.css), so on a 390px phone a heading like "Reliable.
 * Comfortable. Always on Time." wraps to four heavy lines instead of
 * reading as a tidy 2-3 line headline.
 */
.about-text {
    margin-bottom: 14px;
}

.about-text:last-of-type {
    margin-bottom: 0;
}

@media (max-width: 991px) {
    .site-title {
        font-size: 36px;
    }
}

@media (max-width: 575px) {
    .site-title {
        font-size: 28px;
        line-height: 1.3;
    }
}

/*
 * style.css hardcodes .filter-btn.active to a literal #FFB300 (not a var()),
 * so the trip-type tabs on the booking widget stayed the old template yellow
 * even after --color-primary was repointed to the brand's #FFDB58. Same file
 * also hardcodes the header/footer's WhatsApp + accent styling in a few spots.
 */
.filter-btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-secondary);
}

/* ===================================================================
 * Home page: rating strip, promo banners, "what sets us apart" strip,
 * and service-card feature chips (see resources/views/user/index.blade.php)
 * =================================================================== */

/* ---- Ratings strip under the booking widget ---- */
.rating-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 0;
    max-width: 720px;
    margin: 28px auto 0;
    background: var(--color-surface);
    border-radius: 999px;
    padding: 14px 30px;
    box-shadow: var(--shadow-soft);
}

.rating-strip .rating-chip {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 16px;
    min-width: 150px;
    border-right: 1px solid var(--color-border);
}

.rating-strip .rating-chip:last-child {
    border-right: none;
}

.rating-strip .rating-chip i.chip-icon {
    font-size: 22px;
    color: var(--color-secondary);
}

.rating-strip .rating-chip .rating-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--color-secondary);
    display: block;
}

.rating-strip .rating-chip .rating-stars i {
    font-size: 11px;
    color: var(--color-primary);
}

.rating-strip .rating-chip .rating-count {
    font-size: 12px;
    color: var(--color-muted-text);
}

@media (max-width: 767px) {
    .rating-strip {
        border-radius: var(--radius-md);
        padding: 16px;
        gap: 14px 0;
    }

    .rating-strip .rating-chip {
        flex: 1 1 100%;
        border-right: none;
        border-bottom: 1px solid var(--color-border);
        padding-bottom: 14px;
        justify-content: flex-start;
    }

    .rating-strip .rating-chip:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }
}

/* ---- Promo banner row (3 cards) ---- */
.promo-area {
    padding: 50px 0 10px;
}

.promo-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 130px;
    padding: 18px 20px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background-size: cover;
    background-position: center;
    isolation: isolate;
}

.promo-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(251, 245, 233, .96) 42%, rgba(251, 245, 233, .55));
    z-index: -1;
}

.promo-card .promo-icon {
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--color-primary);
    color: var(--color-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.promo-card .promo-badge {
    display: inline-block;
    background: var(--color-secondary);
    color: var(--color-primary);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 999px;
    margin-bottom: 6px;
}

.promo-card .promo-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--color-secondary);
    margin: 0;
    line-height: 1.25;
}

.promo-card .promo-sub {
    font-size: 13px;
    color: var(--color-secondary);
    margin: 2px 0 0;
}

@media (max-width: 991px) {
    .promo-card {
        min-height: 110px;
    }
}

/* ---- "What sets us apart" strip ---- */
.apart-area {
    padding: 6px 0;
}

.apart-strip {
    background: var(--color-secondary);
    border-radius: var(--radius-md);
    padding: 26px 20px;
}

.apart-item {
    display: flex;
    align-items: center;
    gap: 14px;
    justify-content: center;
    text-align: left;
}

.apart-item .apart-icon {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.apart-item .apart-icon img {
    width: 28px;
    height: 28px;
    filter: brightness(0) saturate(100%);
}

.apart-item .apart-label {
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    line-height: 1.3;
    margin: 0;
}

@media (max-width: 767px) {
    .apart-item {
        justify-content: flex-start;
        margin-bottom: 18px;
    }

    .apart-item:last-child {
        margin-bottom: 0;
    }
}

/* ---- Service card feature chips (Expert Chauffeurs / Safety Certified / ...) ---- */
.service-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--color-border);
}

.service-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-secondary);
}

.service-chip i {
    color: var(--color-primary);
    -webkit-text-stroke: .4px var(--color-secondary);
    font-size: 13px;
}