/* features/static/features/css/front/features-common.css */
/* ============================================================
   Shared UI for card features (notes, procedures, CV, services,
   working hours …). One card language across the app:
     [thumb] [title + meta chips] ............ [chevron]
   Direction-agnostic (logical properties only) - mirrors in RTL.
   Loaded once by cards/themes/business.html.
   ============================================================ */

:root {
    --fx-accent: var(--primary-color, #ff6b93);
    --fx-accent-soft: color-mix(in srgb, var(--fx-accent) 10%, #fff);
    --fx-border: #eef0f2;
    --fx-text: #212529;
    --fx-muted: #6c757d;
    --fx-radius: 14px;
    --fx-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 2px 8px rgba(16, 24, 40, .05);
}

/* ---------- Collapsible card ---------------------------- */
.fx-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fx-card {
    background: #fff;
    border: 1px solid var(--fx-border);
    border-radius: var(--fx-radius);
    box-shadow: var(--fx-shadow);
    overflow: hidden;
    transition: box-shadow .2s ease, border-color .2s ease;
}

.fx-card:hover {
    box-shadow: 0 4px 16px rgba(16, 24, 40, .08);
}

.fx-card.is-featured,
.fx-card.is-pinned {
    border-color: color-mix(in srgb, var(--fx-accent) 35%, #fff);
}

/* whole header row is the toggle (bigger tap target than a lone chevron) */
.fx-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 14px;
    background: transparent;
    border: 0;
    color: inherit;
    text-align: start;
    cursor: pointer;
    font: inherit;
}

/* a click/tap left the browser's focus frame around the header (the card's Bootstrap 4 reboot
   outlines focused buttons); keyboard focus still gets the outline below */
.fx-card-header:focus:not(:focus-visible) {
    outline: none;
    box-shadow: none;
}

.fx-card-header:focus-visible {
    outline: 2px solid var(--fx-accent);
    outline-offset: -2px;
    border-radius: var(--fx-radius);
}

/* thumbnail: image, or tinted icon tile */
.fx-thumb {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--fx-accent-soft);
    color: var(--fx-accent);
    font-size: 1.3rem;
}

.fx-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.fx-heading {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
}

.fx-title {
    display: block;
    margin: 0;
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--fx-text);
    overflow-wrap: anywhere;
}

.fx-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* chevron always at the END of the row (right in LTR, left in RTL) */
.fx-chevron {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    margin-inline-start: auto;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f5f6f8;
    color: var(--fx-muted);
    font-size: 0.8rem;
    transition: transform .25s ease, background-color .2s ease, color .2s ease;
}

.fx-card-header[aria-expanded="true"] .fx-chevron {
    transform: rotate(180deg);
    background: var(--fx-accent);
    color: #fff;
}

.fx-card-body {
    padding: 14px;
    border-top: 1px solid var(--fx-border);
    display: flex;
    flex-direction: column;
    gap: 14px;
    color: #343a40;
    font-size: 0.92rem;
    line-height: 1.75;
}

.fx-card-body p:last-child {
    margin-bottom: 0;
}

/* ---------- Chips ---------------------------------------- */
.fx-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    background: #f1f3f5;
    color: #495057;
    font-size: 0.74rem;
    font-weight: 500;
    line-height: 1.5;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.fx-chip i {
    font-size: 0.72rem;
    color: var(--fx-accent);
}

.fx-chip--accent {
    background: var(--fx-accent-soft);
    color: var(--fx-accent);
    font-weight: 600;
}

.fx-chip--success {
    background: #e8f6ee;
    color: #198754;
}

.fx-chip--success i {
    color: #198754;
}

/* ---------- Body blocks ---------------------------------- */
.fx-block-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 6px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--fx-muted);
    text-transform: none;
}

.fx-block-title i {
    color: var(--fx-accent);
}

.fx-hero {
    margin: -14px -14px 0;
    aspect-ratio: 16 / 9;
    max-height: 260px;
    overflow: hidden;
    background: #f1f3f5;
}

.fx-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.fx-callout {
    padding: 10px 12px;
    border-radius: 10px;
    background: #f8f9fa;
    border-inline-start: 3px solid var(--fx-accent);
}

/* attachment row */
.fx-file {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--fx-border);
    border-radius: 12px;
    background: #fafbfc;
}

.fx-file-icon {
    flex: 0 0 40px;
    height: 40px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: var(--fx-accent);
    font-size: 1.2rem;
    box-shadow: inset 0 0 0 1px var(--fx-border);
}

.fx-file-info {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.35;
}

.fx-file-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--fx-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fx-file-size {
    font-size: 0.75rem;
    color: var(--fx-muted);
    font-variant-numeric: tabular-nums;
}

/* buttons */
.fx-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 10px;
    border: 0;
    background: var(--fx-accent);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: filter .2s ease;
}

.fx-btn:hover {
    filter: brightness(.94);
    color: #fff;
}

.fx-btn--ghost {
    background: var(--fx-accent-soft);
    color: var(--fx-accent);
}

.fx-btn--ghost:hover {
    color: var(--fx-accent);
}

.fx-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* numbered timeline (procedure steps) */
.fx-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.fx-timeline-item {
    position: relative;
    display: flex;
    gap: 12px;
    padding-bottom: 14px;
}

.fx-timeline-item:last-child {
    padding-bottom: 0;
}

/* connector line between dots */
.fx-timeline-item:not(:last-child)::before {
    content: '';
    position: absolute;
    top: 30px;
    bottom: 2px;
    inset-inline-start: 13px;
    width: 2px;
    background: var(--fx-border);
}

.fx-timeline-dot {
    flex: 0 0 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--fx-accent);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.fx-timeline-text {
    flex: 1 1 auto;
    min-width: 0;
    padding-top: 3px;
    line-height: 1.7;
}

.fx-timeline-text strong {
    display: block;
    color: var(--fx-text);
}

.fx-empty {
    text-align: center;
    padding: 40px 16px;
    color: var(--fx-muted);
}

.fx-empty i {
    display: block;
    font-size: 2.5rem;
    opacity: .35;
    margin-bottom: 10px;
}

/* ============================================================
   Services summary (main tab, services.html)
   ============================================================ */
.service-item .service-icon-img {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
}

.service-item-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 4px 0 2px;
}

/* ============================================================
   Working hours
   ============================================================ */
.working-hours-table td {
    padding: 8px 4px;
    font-variant-numeric: tabular-nums;
}

.working-hours-table td.text-end {
    text-align: end !important;
}

.working-hours-table .wh-range {
    white-space: nowrap;
}

/* ============================================================
   Segmented view toggle (media + gallery: grid / list)
   Grey track, raised white "thumb" on the active option.
   High specificity on purpose: Bootstrap .btn-group/.btn-outline-* rules
   would otherwise add borders and joined corners.
   ============================================================ */
.section-title .fx-segmented {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border-radius: 10px;
    background: #f1f3f5;
    box-shadow: inset 0 0 0 1px var(--fx-border);
    flex-shrink: 0;
}

.section-title .fx-segmented > .btn {
    width: 32px;
    height: 28px;
    padding: 0;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 8px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--fx-muted);
    font-size: 0.8rem;
    line-height: 1;
    box-shadow: none;
    transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
}

.section-title .fx-segmented > .btn:hover {
    color: var(--fx-accent);
    background: transparent;
}

.section-title .fx-segmented > .btn.active,
.section-title .fx-segmented > .btn:active {
    background: #fff;
    color: var(--fx-accent);
    box-shadow: 0 1px 2px rgba(16, 24, 40, .1), 0 1px 4px rgba(16, 24, 40, .08);
}

.section-title .fx-segmented > .btn:focus-visible {
    outline: 2px solid var(--fx-accent);
    outline-offset: 1px;
}

/* ============================================================
   Service card (Services tab + main-page summary)
   Same look as the booking service card:
     [icon] Name
     description
     - - - - - - - - - - - - - - - - - - -
     (clock 60 min)              400,000 T
   ============================================================ */
.fx-service-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fx-service {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem 1.125rem;
    background: #fff;
    border: 1px solid var(--fx-border);
    border-radius: var(--fx-radius);
    box-shadow: var(--fx-shadow);
    transition: box-shadow .2s ease, border-color .2s ease;
}

.fx-service:hover {
    border-color: color-mix(in srgb, var(--fx-accent) 30%, #fff);
    box-shadow: 0 4px 16px rgba(16, 24, 40, .08);
}

.fx-service-head {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.fx-service .fx-thumb {
    flex-basis: 2.75rem;
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1.1rem;
}

.fx-service-name {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--fx-text);
    overflow-wrap: anywhere;
}

.fx-service-desc {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.7;
    color: var(--fx-muted);
}

.fx-service-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--fx-border);
}

.fx-service-duration {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    background: #f1f3f5;
    color: #495057;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}

.fx-service-duration i {
    color: var(--fx-accent);
    font-size: 0.8rem;
}

/* price sits at the end; alone (no duration) it still aligns to the end */
.fx-service-price {
    margin-inline-start: auto;
    font-size: 1rem;
    font-weight: 700;
    color: #198754;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* group class / private badges (same look as booking step 1's .service-group / .service-private) */
.fx-service-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}

.fx-service-group { background: #e7f5ff; color: #0b5394; }
.fx-service-group-note { background: #fff4e5; color: #8a4b00; }
.fx-service-private { background: #f1f3f5; color: #343a40; }

.fx-service-price small {
    font-weight: 500;
    color: #6c757d;
}

/* ============================================================
   Form note (checkout, booking): one full row above the fields it
   explains — never squeezed into a grid cell.
   ============================================================ */
.fx-hint {
    grid-column: 1 / -1;
    flex: 1 0 100%;
    width: 100%;
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    margin: 0;
    padding: .6rem .85rem;
    border-radius: 10px;
    background: var(--fx-accent-soft);
    color: #374151;
    font-size: .85rem;
    line-height: 1.5;
}
.fx-hint i { color: var(--fx-accent); margin-top: .2rem; flex-shrink: 0; }

/* ============================================================
   Status chips (location type, accessibility): soft background +
   dark text of the same hue, readable on every card colour.
   ============================================================ */
.fx-chip {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .4rem .85rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}
.fx-chip--icon { padding: .4rem .65rem; font-size: .95rem; }
.fx-chip--success { background: #e8f5ee; border-color: #cfe9db; color: #146c43; }
.fx-chip--info    { background: #e6f6fa; border-color: #c6eaf3; color: #076477; }
.fx-chip--primary { background: #e8effe; border-color: #d0defc; color: #1e48b8; }
.fx-chip--warning { background: #fff3dc; border-color: #fbe0ad; color: #7a4a00; }
