/* ==========================================================================
   dalelalmosafer.com — brand identity + unit finder
   --------------------------------------------------------------------------
   Loaded after phase1.css, which already declares the Dubai @font-face rules
   and the --dm-* colour tokens. This file applies the identity to the theme's
   own components and styles the two things Phase 1 added to the front end:
   the one-tap quick navigation and the conversational finder.

   Plain CSS on purpose — the theme's gulp/vite pipeline is not part of the
   deploy, so anything needing a recompile would never ship.

   Contents
     1.  Identity applied to the stock theme
     2.  Brand pattern
     3.  Quick navigation — categories and cities
     4.  Finder — launcher
     5.  Finder — panel
     6.  Finder — messages and chips
     7.  Finder — result cards
     8.  Motion and reduced motion
   ========================================================================== */


/* 1. Identity applied to the stock theme ================================== */
/*
   Booking Core ships a blue-and-orange default palette that has nothing to do
   with this brand. Rather than fork the theme, the handful of colours it
   actually paints are re-pointed at the identity's own four.
*/
:root {
    --dm-shadow-sm: 0 1px 2px rgba(12, 32, 40, .06), 0 2px 8px rgba(12, 32, 40, .04);
    --dm-shadow-md: 0 4px 14px rgba(12, 32, 40, .10), 0 12px 32px rgba(12, 32, 40, .07);
    --dm-shadow-lg: 0 18px 50px rgba(12, 32, 40, .18);
}

.btn-primary,
.bravo-btn-primary,
.btn.btn-book,
.form-search .btn-search,
.bravo_form_search .btn-primary {
    background-color: var(--dm-trust);
    border-color: var(--dm-trust);
    color: #fff;
}

.btn-primary:hover,
.btn-primary:focus,
.bravo-btn-primary:hover,
.btn.btn-book:hover {
    background-color: #0a3d4f;
    border-color: #0a3d4f;
    color: #fff;
}

a { color: var(--dm-trust); }
a:hover, a:focus { color: var(--dm-infinity); }

/* The theme marks discounts, badges and active states with its default accent. */
.featured,
.badge-featured,
.bravo_topbar .topbar-items .active,
.list-star .fa-star {
    color: var(--dm-energy);
}

.featured {
    background: var(--dm-energy);
    color: #3d2c00;
    font-weight: 600;
}

.bravo_topbar {
    background: var(--dm-trust);
    color: #dceef2;
}
.bravo_topbar a { color: #dceef2; }
.bravo_topbar a:hover { color: var(--dm-energy); }

.bravo_footer,
.footer-wrapper {
    background: var(--dm-trust);
    color: #cfe3e9;
}
.bravo_footer a,
.footer-wrapper a { color: #cfe3e9; }
.bravo_footer a:hover,
.footer-wrapper a:hover { color: var(--dm-infinity); }

/* The site logo, wherever the theme renders it. The shipped SVG has a wide
   aspect ratio (roughly 2.9:1), so it is constrained by height and left to find
   its own width. */
.bravo-logo__img,
.bravo_header .logo img,
.site-logo img {
    block-size: auto;
    max-block-size: 48px;
    inline-size: auto;
    max-inline-size: 240px;
}

@media (max-width: 575.98px) {
    .bravo-logo__img { max-block-size: 38px; max-inline-size: 180px; }
}

/* Listing cards: the theme's are flat and borderless, which makes a grid of
   them read as one undifferentiated block. */
.item-loop {
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    box-shadow: var(--dm-shadow-sm);
    transition: box-shadow .22s ease, transform .22s ease;
}
.item-loop:hover {
    box-shadow: var(--dm-shadow-md);
    transform: translateY(-2px);
}
.item-loop .thumb-image img {
    inline-size: 100%;
    block-size: 100%;
    object-fit: cover;
}


/* 2. Brand pattern ======================================================== */
/*
   From the identity guidelines, section 04: ribbons that read as travel routes,
   in the four brand colours. Used at low opacity behind flat brand-coloured
   panels — never behind body text.
*/
.dm-pattern,
.dm-quicknav::before,
.dm-finder__head::before {
    background-image: url("../../../images/brand/pattern-routes.svg");
    background-size: 240px 240px;
    background-repeat: repeat;
}


/* 3. Quick navigation ===================================================== */
.dm-quicknav {
    position: relative;
    background: var(--dm-surface, #f4f9fa);
    border-block-end: 1px solid var(--dm-hairline, rgba(13, 77, 99, .14));
    padding-block: 22px 20px;
    overflow: hidden;
}

.dm-quicknav::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .05;
    pointer-events: none;
}

.dm-quicknav > .container { position: relative; }

.dm-quicknav__cats {
    display: flex;
    gap: 10px;
    margin: 0 0 18px;
    padding: 0 0 4px;
    list-style: none;
    overflow-x: auto;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.dm-quicknav__cat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-inline-size: 104px;
    padding: 14px 12px 12px;
    border-radius: 14px;
    background: #fff;
    border: 1.5px solid var(--dm-hairline, rgba(13, 77, 99, .14));
    color: var(--dm-ink, #10242c);
    text-decoration: none;
    text-align: center;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.dm-quicknav__cat:hover,
.dm-quicknav__cat:focus-visible {
    border-color: var(--dm-infinity);
    box-shadow: var(--dm-shadow-sm);
    color: var(--dm-trust);
    text-decoration: none;
    transform: translateY(-2px);
}

.dm-quicknav__cat.is-current {
    border-color: var(--dm-trust);
    background: var(--dm-trust);
    color: #fff;
}

.dm-quicknav__cat-icon { color: var(--dm-trust); }
.dm-quicknav__cat.is-current .dm-quicknav__cat-icon { color: var(--dm-energy); }

.dm-quicknav__cat-label {
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.35;
}

.dm-quicknav__cat-count {
    font-size: 11.5px;
    font-variant-numeric: tabular-nums;
    opacity: .62;
}

.dm-quicknav__cities {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
}

.dm-quicknav__cities-label {
    font-weight: 700;
    font-size: 14px;
    color: var(--dm-trust);
}

.dm-quicknav__cities ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.dm-quicknav__city {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--dm-hairline, rgba(13, 77, 99, .14));
    color: var(--dm-ink, #10242c);
    font-size: 13.5px;
    text-decoration: none;
    transition: background .16s ease, color .16s ease, border-color .16s ease;
}

.dm-quicknav__city small {
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    opacity: .6;
}

.dm-quicknav__city:hover,
.dm-quicknav__city:focus-visible {
    background: var(--dm-trust);
    border-color: var(--dm-trust);
    color: #fff;
    text-decoration: none;
}
.dm-quicknav__city:hover small { opacity: .8; }

.dm-quicknav__hint {
    margin: 16px 0 0;
    font-size: 13.5px;
    color: var(--dm-ink-soft, #6b858e);
}

.dm-quicknav__ask {
    border: 0;
    background: none;
    padding: 0;
    font: inherit;
    color: var(--dm-trust);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
.dm-quicknav__ask:hover { color: var(--dm-infinity); }

@media (max-width: 575.98px) {
    .dm-quicknav__cat { min-inline-size: 92px; padding: 12px 8px 10px; }
    .dm-quicknav__cat-label { font-size: 12.5px; }
}


/* 4. Finder — launcher ==================================================== */
.dm-finder__launcher {
    position: fixed;
    inset-block-end: 22px;
    inset-inline-start: 22px;
    z-index: 1040;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 13px 20px;
    border: 0;
    border-radius: 999px;
    background: var(--dm-trust);
    color: #fff;
    font: inherit;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--dm-shadow-lg);
    transition: transform .2s ease, background .2s ease;
}

.dm-finder__launcher:hover,
.dm-finder__launcher:focus-visible {
    background: #0a3d4f;
    transform: translateY(-2px);
}

.dm-finder__launcher-icon { color: var(--dm-energy); display: inline-flex; }

.dm-finder.is-open .dm-finder__launcher { display: none; }

@media (max-width: 480px) {
    .dm-finder__launcher {
        inset-block-end: 16px;
        inset-inline-start: 16px;
        padding: 12px 16px;
        font-size: 13.5px;
    }
}


/* 5. Finder — panel ======================================================= */
.dm-finder__panel {
    position: fixed;
    inset-block-end: 22px;
    inset-inline-start: 22px;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    inline-size: min(400px, calc(100vw - 32px));
    max-block-size: min(640px, calc(100vh - 44px));
    background: #fff;
    border-radius: 18px;
    box-shadow: var(--dm-shadow-lg);
    overflow: hidden;
}

.dm-finder__panel[hidden] { display: none; }

.dm-finder__head {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: var(--dm-trust);
    color: #fff;
    overflow: hidden;
}

.dm-finder__head::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .12;
    pointer-events: none;
}

.dm-finder__head-id {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    min-inline-size: 0;
}

.dm-finder__head-mark {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    inline-size: 38px;
    block-size: 38px;
    border-radius: 11px;
    background: rgba(255, 255, 255, .14);
    color: var(--dm-infinity);
}

.dm-finder__head-id strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
}

.dm-finder__head-id small {
    display: block;
    font-size: 12px;
    line-height: 1.5;
    opacity: .78;
}

.dm-finder__close {
    position: relative;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    inline-size: 32px;
    block-size: 32px;
    border: 0;
    border-radius: 9px;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    cursor: pointer;
    transition: background .16s ease;
}
.dm-finder__close:hover { background: rgba(255, 255, 255, .24); }

.dm-finder__log {
    flex: 1 1 auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f7fbfb;
}

.dm-finder__status {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 16px 10px;
    font-size: 12.5px;
    color: var(--dm-ink-soft, #6b858e);
    background: #f7fbfb;
}
.dm-finder__status[hidden] { display: none; }

.dm-finder__dots { display: inline-flex; gap: 3px; }
.dm-finder__dots i {
    inline-size: 6px;
    block-size: 6px;
    border-radius: 50%;
    background: var(--dm-infinity);
    animation: dm-bounce 1.1s infinite ease-in-out;
}
.dm-finder__dots i:nth-child(2) { animation-delay: .16s; }
.dm-finder__dots i:nth-child(3) { animation-delay: .32s; }

@keyframes dm-bounce {
    0%, 70%, 100% { transform: translateY(0); opacity: .45; }
    35%           { transform: translateY(-4px); opacity: 1; }
}

.dm-finder__form {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 10px 12px;
    border-block-start: 1px solid var(--dm-hairline, rgba(13, 77, 99, .14));
    background: #fff;
}

.dm-finder__form textarea {
    flex: 1 1 auto;
    min-block-size: 42px;
    max-block-size: 120px;
    padding: 10px 13px;
    border: 1.5px solid var(--dm-hairline, rgba(13, 77, 99, .14));
    border-radius: 12px;
    background: #fff;
    color: var(--dm-ink, #10242c);
    font: inherit;
    font-size: 14px;
    line-height: 1.6;
    resize: none;
}

.dm-finder__form textarea:focus {
    outline: none;
    border-color: var(--dm-infinity);
    box-shadow: 0 0 0 3px rgba(60, 201, 201, .18);
}

.dm-finder__form button {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    inline-size: 42px;
    block-size: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--dm-trust);
    color: #fff;
    cursor: pointer;
    transition: background .16s ease;
}
.dm-finder__form button:hover:not(:disabled) { background: #0a3d4f; }
.dm-finder__form button:disabled { opacity: .5; cursor: default; }

/* The send glyph points along the reading direction. */
.dm-finder__form button svg { transform: scaleX(-1); }
[dir="ltr"] .dm-finder__form button svg,
html:not([dir="rtl"]) .is-ltr .dm-finder__form button svg { transform: none; }

.dm-finder__note {
    margin: 0;
    padding: 0 16px 12px;
    font-size: 11.5px;
    line-height: 1.6;
    color: var(--dm-ink-soft, #6b858e);
    background: #fff;
}

@media (max-width: 480px) {
    .dm-finder__panel {
        inset: 0;
        inline-size: 100%;
        max-block-size: 100%;
        border-radius: 0;
    }
}


/* 6. Finder — messages and chips ========================================== */
.dm-finder__msg {
    max-inline-size: 88%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.75;
}

.dm-finder__msg p { margin: 0; }
.dm-finder__msg p + p { margin-block-start: 7px; }

.dm-finder__msg--bot {
    align-self: flex-start;
    background: #fff;
    color: var(--dm-ink, #10242c);
    border: 1px solid var(--dm-hairline-soft, rgba(13, 77, 99, .08));
    border-start-start-radius: 4px;
}

.dm-finder__msg--me {
    align-self: flex-end;
    background: var(--dm-trust);
    color: #fff;
    border-end-end-radius: 4px;
}

.dm-finder__examples {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.dm-finder__chip {
    padding: 7px 13px;
    border: 1px solid var(--dm-infinity);
    border-radius: 999px;
    background: rgba(60, 201, 201, .09);
    color: var(--dm-trust);
    font: inherit;
    font-size: 12.5px;
    line-height: 1.5;
    text-align: start;
    cursor: pointer;
    transition: background .16s ease, color .16s ease;
}

.dm-finder__chip:hover,
.dm-finder__chip:focus-visible {
    background: var(--dm-infinity);
    color: #06333f;
}


/* 7. Finder — result cards ================================================ */
.dm-finder__results {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dm-finder__strip {
    display: grid;
    gap: 9px;
}

.dm-finder__card {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 11px;
    padding: 8px;
    border-radius: 13px;
    background: #fff;
    border: 1px solid var(--dm-hairline-soft, rgba(13, 77, 99, .08));
    color: var(--dm-ink, #10242c);
    text-decoration: none;
    transition: border-color .16s ease, box-shadow .16s ease;
}

.dm-finder__card:hover,
.dm-finder__card:focus-visible {
    border-color: var(--dm-infinity);
    box-shadow: var(--dm-shadow-sm);
    color: var(--dm-ink, #10242c);
    text-decoration: none;
}

.dm-finder__card-media {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    border-radius: 9px;
    overflow: hidden;
    background: #e4eef0;
}

.dm-finder__card-media img {
    inline-size: 100%;
    block-size: 100%;
    object-fit: cover;
}

.dm-finder__card-price {
    position: absolute;
    inset-block-end: 4px;
    inset-inline-start: 4px;
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(13, 77, 99, .92);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.dm-finder__card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    min-inline-size: 0;
}

.dm-finder__card-title {
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.45;
    /* Two lines maximum: a card is a glance, not a paragraph. */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dm-finder__card-city,
.dm-finder__card-meta {
    font-size: 11.5px;
    line-height: 1.6;
    color: var(--dm-ink-soft, #6b858e);
}

.dm-finder__card-meta { font-variant-numeric: tabular-nums; }

.dm-finder__all {
    display: block;
    padding: 11px;
    border-radius: 12px;
    background: var(--dm-trust);
    color: #fff;
    font-size: 13.5px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: background .16s ease;
}

.dm-finder__all:hover,
.dm-finder__all:focus-visible {
    background: #0a3d4f;
    color: #fff;
    text-decoration: none;
}


/* 8. Motion =============================================================== */
.dm-finder__panel:not([hidden]) {
    animation: dm-rise .22s cubic-bezier(.2, .7, .3, 1);
}

@keyframes dm-rise {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .dm-finder__panel:not([hidden]),
    .dm-finder__dots i {
        animation: none;
    }
    .dm-finder__launcher:hover,
    .dm-quicknav__cat:hover,
    .item-loop:hover {
        transform: none;
    }
}

/* A visible focus ring everywhere the theme removed it. */
.dm-finder :focus-visible,
.dm-quicknav :focus-visible {
    outline: 2px solid var(--dm-infinity);
    outline-offset: 2px;
}

/* Screen-reader-only label helper, in case the theme does not define one. */
.sr-only {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
