/* Saved travelers page */
body.travelers-page {
    --tr-blue: #1c4494;
    --tr-bg: #f1f4f8;
    --tr-text: #111827;
    --tr-muted: #6b7280;
    font-family: 'GM', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.travelers__hero {
    background: linear-gradient(135deg, #1c4494 0%, #2f6fed 100%);
    color: #fff;
    padding: calc(var(--navbar-clearance, 88px) + var(--smart-app-banner-height, 0px) + 0.95rem) 0 1rem;
}

/* Laptop (English / LTR): taller hero under fixed nav */
@media (min-width: 1024px) {
    html:not([dir="rtl"]) .travelers__hero {
        background: linear-gradient(135deg, #1c4494 0%, #2f6fed 100%);
        color: #fff;
        padding: calc(var(--navbar-clearance, 88px) + var(--smart-app-banner-height, 0px) + 1.95rem) 0 1.8rem;
    }
}

.travelers__hero-inner h1 {
    margin: 0 0 0.25rem;
    font-size: 1.25rem;
    font-weight: 750;
    line-height: 1.25;
}

.travelers__hero-inner p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
    line-height: 1.4;
}

.travelers__content {
    background: var(--tr-bg);
    min-height: 50vh;
    padding: 0.85rem 0 2rem;
}

.travelers__layout {
    max-width: 640px;
}

.travelers__state {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fff;
    border-radius: 16px;
    padding: 2rem 1.25rem;
    text-align: center;
    box-shadow: 0 1px 4px rgba(109, 109, 109, 0.1);
}

/* display:flex above must not override the HTML hidden attribute */
.travelers__state[hidden],
.travelers__panel[hidden] {
    display: none !important;
}

.travelers__state i {
    font-size: 1.6rem;
    color: var(--tr-muted);
    margin-bottom: 0.65rem;
}

.travelers__state h2 {
    margin: 0 0 0.35rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--tr-text);
}

.travelers__state p {
    margin: 0 0 1rem;
    color: var(--tr-muted);
    font-size: 0.9rem;
}

html[dir="rtl"] .travelers__state,
html[dir="rtl"] .travelers__state h2,
html[dir="rtl"] .travelers__state p,
html[dir="rtl"] .travelers__state a {
    text-align: center;
}

.tr-dialog[hidden] {
    display: none !important;
}

body.tr-dialog-open {
    overflow: hidden;
}

.tr-dialog {
    position: fixed;
    inset: 0;
    z-index: 100200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}

.tr-dialog__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(4px);
}

.tr-dialog__card {
    position: relative;
    width: min(100%, 400px);
    background: #fff;
    border-radius: 20px;
    padding: 1.4rem 1.25rem 1.15rem;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
    text-align: center;
}

.tr-dialog__icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 0.8rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
}

.tr-dialog__icon.is-danger {
    background: #fef2f2;
    color: #ef4444;
}

.tr-dialog__icon.is-info {
    background: #eef2ff;
    color: #4361ee;
}

.tr-dialog__card h3 {
    margin: 0 0 0.4rem;
    font-size: 1.08rem;
    font-weight: 750;
    color: #111827;
}

.tr-dialog__card p {
    margin: 0 0 1.15rem;
    color: #6b7280;
    font-size: 0.92rem;
    line-height: 1.5;
}

.tr-dialog__actions {
    display: flex;
    justify-content: center;
    gap: 0.55rem;
}

.tr-dialog__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 7.25rem;
    min-height: 42px;
    padding: 0.45rem 1rem;
    border: none;
    border-radius: 12px;
    font: inherit;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
}

html[dir="rtl"] .tr-dialog__btn {
    direction: rtl;
    text-align: center;
    justify-content: center;
}

.tr-dialog__btn--ghost {
    background: #f3f4f6;
    color: #374151;
}

.tr-dialog__btn--danger {
    background: #ef4444;
    color: #fff;
}

.tr-dialog__btn--primary {
    background: #4361ee;
    color: #fff;
}

html[dir="rtl"] .tr-dialog__card,
html[dir="rtl"] .tr-dialog__card h3,
html[dir="rtl"] .tr-dialog__card p {
    text-align: center;
}

.travelers__state .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.travelers__panel {
    background: #fff;
    border-radius: 16px;
    padding: 0.85rem 0.9rem 1rem;
    box-shadow: 0 1px 4px rgba(109, 109, 109, 0.1);
}

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

.travelers__toolbar-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.88rem;
    font-weight: 650;
    color: var(--tr-text);
}

.travelers__toolbar-meta i {
    color: var(--tr-muted);
}

.travelers__add-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 40px;
    padding: 0.4rem 0.8rem;
    border: none;
    border-radius: 12px;
    background: #4361ee;
    color: #fff;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 650;
    cursor: pointer;
    white-space: nowrap;
}

.travelers__search {
    position: relative;
    display: block;
    flex: 1 0 100%;
    order: 3;
    margin: 0;
}

.travelers__search i.fa-search {
    position: absolute;
    inset-inline-start: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--tr-muted);
    pointer-events: none;
}

.travelers__search input {
    width: 100%;
    min-height: 44px;
    border: 1px solid #e0e3e7;
    border-radius: 12px;
    background: #f8fafc;
    padding: 0.55rem 2.4rem;
    font: inherit;
    font-size: 0.92rem;
    color: var(--tr-text);
    outline: none;
}

.travelers__search input:focus {
    border-color: #4361ee;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
    background: #fff;
}

.travelers__search-clear {
    position: absolute;
    inset-inline-end: 0.4rem;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--tr-muted);
    cursor: pointer;
}

.travelers__search-clear[hidden] {
    display: none !important;
}

.travelers__meta-row {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.65rem;
    min-height: 1.25rem;
}

.travelers__delete-all {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    border: none;
    background: transparent;
    color: #ef4444;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 650;
    cursor: pointer;
    padding: 0;
}

.travelers__delete-all[hidden] {
    display: none !important;
}

.travelers__list {
    margin-top: 0.15rem;
}

.travelers-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.55rem 0.75rem;
    align-items: start;
    background: #f8fafc;
    border: 1px solid #e6eaf0;
    border-radius: 16px;
    padding: 0.85rem 0.9rem;
}

.travelers-card__who {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.travelers-card__name {
    min-width: 0;
    font-size: 1rem;
    font-weight: 750;
    color: var(--tr-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.travelers-card__facts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.85rem;
    grid-column: 1 / -1;
    min-width: 0;
}

.travelers-card__fact {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
    max-width: 100%;
    font-size: 0.84rem;
    font-weight: 600;
    color: #374151;
}

.travelers-card__fact > i {
    width: 1rem;
    color: #6b7280;
    text-align: center;
    flex-shrink: 0;
}

.travelers-card__fact > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.travelers-card__fact--ltr > span,
.travelers-card__passport {
    letter-spacing: 0.02em;
    direction: ltr;
    unicode-bidi: isolate;
}

.travelers-card__eye,
.travelers-card__action {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 10px;
    background: #f3f4f6;
    color: #4b5563;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.travelers-card__action--danger {
    color: #ef4444;
    background: #fef2f2;
}

.travelers-card__actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.travelers__list .fb-sheet__card {
    cursor: default;
}

@media (min-width: 900px) {
    .travelers__layout {
        max-width: 1080px;
    }

    .travelers__panel {
        padding: 1.15rem 1.25rem 1.25rem;
    }

    .travelers__toolbar {
        flex-wrap: nowrap;
        gap: 0.85rem;
        margin-bottom: 0.85rem;
    }

    .travelers__search {
        flex: 1 1 auto;
        order: 0;
    }

    .travelers-card {
        grid-template-columns: minmax(180px, 240px) minmax(0, 1fr) auto;
        align-items: center;
        padding: 0.9rem 1rem;
    }

    .travelers-card__facts {
        grid-column: auto;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.45rem 1.1rem;
    }
}

.fb-sheet__skeleton[hidden],
.fb-sheet__empty[hidden],
.travelers__list[hidden] {
    display: none !important;
}
