/* Project-specific tweaks on top of the Paces admin template. */

.admin-logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    white-space: nowrap;
}

html[data-menu-color="light"] .admin-logo-text {
    color: var(--bs-emphasis-color);
}

.sidenav-menu .logo-lg img {
    max-width: 180px;
    object-fit: contain;
}

/* The small logo (the cafe's favicon, Ayarlar → Genel) may be a wide picture: in the narrow sidebar (tablets) it ran
   under the topbar's menu button, on phones it pushed the topbar's right side off screen. Kept inside its box. */
.sidenav-menu .logo-sm img {
    max-width: 52px;
    object-fit: contain;
}

.logo-topbar .logo-sm img {
    max-width: 88px;
    object-fit: contain;
}

/* While the sidebar widens / narrows (tablets, menu button) the big logo shows before the sidebar is wide enough:
   clipped to the sidebar instead of spilling under the topbar's menu button. */
.sidenav-menu > .logo {
    max-width: 100%;
    overflow: hidden;
}

/* Logout button inside the user dropdown should look like a link item. */
.dropdown-menu form .dropdown-item {
    width: 100%;
    text-align: start;
}

/* Sidebar "Çıkış Yap": a form button styled like the other menu links. */
.side-nav-logout {
    margin-top: .75rem;
    padding-top: .75rem;
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.side-nav-logout button.side-nav-link {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: start;
}

.auth-brand img {
    max-height: 40px;
    max-width: 220px;
    object-fit: contain;
}

/* Payment method picker: whole card is the click target, highlight the chosen one. */
.payment-option {
    cursor: pointer;
    transition: border-color .15s, background-color .15s;
}

.payment-option:hover {
    border-color: var(--bs-primary) !important;
}

.payment-option:has(input:checked) {
    border-color: var(--bs-primary) !important;
    background-color: rgba(var(--bs-primary-rgb), .06);
}

/* PayTR's card form (3D Secure pages can be tall). */
.paytr-frame {
    height: 640px;
}

/*
 * Confirm dialog: keep the page behind it fully visible (the theme dims it to 70%
 * and blurs it). The backdrop stays in place, transparent, so outside clicks still
 * close the dialog; a strong shadow separates the dialog from the page instead.
 */
.modal-backdrop.show {
    opacity: 0;
}

.modal-backdrop {
    backdrop-filter: none;
}

#confirmModal .modal-content {
    border: 1px solid var(--bs-border-color);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, .25);
}

/* İçerikler: Quill editor height, and the saved body shown as plain page text. */
.content-editor.ql-container {
    height: auto;
}

.content-editor .ql-editor {
    min-height: 320px;
}

/* Quill's placeholder is hard-coded black; use the theme's muted text color (readable in dark mode). */
.ql-editor.ql-blank::before {
    color: var(--theme-secondary-color, #6c757d);
}

.ql-container.is-invalid {
    border-color: var(--bs-danger, #dc3545) !important;
}

/* Pictures in the texts (e.g. "Nasıl Kullanılır?" screenshots): never wider than the text, a thin frame. */
.ql-snow .ql-editor.content-body img {
    display: block;
    max-width: 100%;
    height: auto;
    margin-top: .75rem;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: .5rem;
}

.ql-snow .ql-editor.content-body {
    padding: 0;
    height: auto;
    overflow: visible;
}

/* The site's video player ("Nasıl Kullanılır?": App\Services\VideoEmbed::players(), dashboard/js/video-player.js):
   16:9, full width; the poster with a big orange play button; the provider's frame underneath a transparent shield
   (clicks toggle play); our bar at the bottom — an orange progress line on top, the buttons below — that fades out
   while playing. Fixed colors so it looks the same in light and dark. */
.vplayer {
    --vplayer-accent: #ff9800;
    position: relative;
    overflow: hidden;
    width: 100%;
    /* Full width, but never taller than the screen (minus the top bar, the title and the item's header): on wide
       screens it is narrower than the text, centred. */
    max-width: calc((100vh - 280px) * 16 / 9);
    aspect-ratio: 16 / 9;
    margin: .75rem auto;
    border-radius: .6rem;
    background-color: #000;
    color: #fff;
    outline: 0;
    user-select: none;
}

.vplayer:focus-visible {
    box-shadow: 0 0 0 3px rgba(255, 152, 0, .55);
}

.vplayer:fullscreen,
.vplayer:-webkit-full-screen {
    max-width: none;
    border-radius: 0;
    aspect-ratio: auto;
    margin: 0;
}

.vplayer-media,
.vplayer-media iframe,
.vplayer-poster,
.vplayer-shield {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* The provider's frame is taller than the box and cut at the top and bottom: the video keeps its full width (the
   frame's extra height is YouTube's black bars), while YouTube's title / channel line at the top and its logo at the
   bottom fall outside the box. */
.vplayer-media iframe {
    top: -70px;
    height: calc(100% + 140px);
    border: 0;
    pointer-events: none;
}

/* Paused: YouTube's own pause screen ("more videos" …) is blurred and darkened under our play button. */
.vplayer-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, .35);
    opacity: 0;
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    pointer-events: none;
    transition: opacity .25s ease;
}

.vplayer.has-started.is-paused .vplayer-media::after {
    opacity: 1;
}

.vplayer-poster {
    object-fit: cover;
    transition: opacity .35s ease;
}

.vplayer-poster-plain {
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 30% 20%, #2b2c36, #14151b 70%);
    color: rgba(255, 255, 255, .08);
    font-size: 9rem;
}

/* Dark gradients behind the bar and over the poster so white controls read on any video. */
.vplayer::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 45%;
    background: linear-gradient(to top, rgba(0, 0, 0, .75), rgba(0, 0, 0, 0));
    pointer-events: none;
    transition: opacity .3s ease;
}

.vplayer.is-idle::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: rgba(0, 0, 0, .25);
    pointer-events: none;
}

/* The poster stays until the video really plays (YouTube's loading screen shows the title), and comes back at the
   end (YouTube's end screen suggests other videos). */
.vplayer.has-started .vplayer-poster {
    opacity: 0;
    pointer-events: none;
}

.vplayer.has-started.is-ended .vplayer-poster {
    opacity: 1;
}

.vplayer-shield {
    z-index: 2;
    cursor: pointer;
}

.vplayer.is-idle .vplayer-shield {
    display: none;
}

.vplayer-big {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4.75rem;
    height: 4.75rem;
    padding: 0 0 0 .3rem;
    border: 0;
    border-radius: 50%;
    background-color: var(--vplayer-accent);
    box-shadow: 0 0 0 .6rem rgba(255, 152, 0, .25), 0 12px 30px rgba(0, 0, 0, .45);
    color: #fff;
    font-size: 2rem;
    transform: translate(-50%, -50%);
    transition: transform .25s ease, box-shadow .25s ease, opacity .25s ease;
}

.vplayer-big:hover,
.vplayer-big:focus-visible {
    transform: translate(-50%, -50%) scale(1.08);
    box-shadow: 0 0 0 .8rem rgba(255, 152, 0, .3), 0 12px 30px rgba(0, 0, 0, .45);
}

/* Paused after playing: the big button comes back, smaller. */
.vplayer.is-playing .vplayer-big,
.vplayer.is-buffering .vplayer-big {
    opacity: 0;
    pointer-events: none;
}

.vplayer.is-paused:not(.is-idle) .vplayer-big {
    width: 3.75rem;
    height: 3.75rem;
    font-size: 1.6rem;
}

.vplayer-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 3;
    display: none;
    color: #fff;
    font-size: 2.6rem;
    transform: translate(-50%, -50%);
}

.vplayer-spinner i {
    display: block;
    animation: vplayer-spin 1s linear infinite;
}

.vplayer.is-buffering .vplayer-spinner {
    display: block;
}

@keyframes vplayer-spin {
    to { transform: rotate(360deg); }
}

/* The bar. */
.vplayer-bar {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 4;
    padding: 0 .9rem .55rem;
    transition: opacity .3s ease, transform .3s ease;
}

.vplayer.is-idle .vplayer-bar {
    opacity: 0;
    pointer-events: none;
}

.vplayer.is-bar-hidden .vplayer-bar,
.vplayer.is-bar-hidden::after {
    opacity: 0;
    transform: translateY(.5rem);
}

.vplayer.is-bar-hidden .vplayer-bar {
    pointer-events: none;
}

.vplayer.is-bar-hidden .vplayer-shield {
    cursor: none;
}

.vplayer-progress {
    position: relative;
    height: 1.1rem;
    cursor: pointer;
    touch-action: none;
}

.vplayer-progress::before,
.vplayer-progress-fill {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    height: 4px;
    border-radius: 2px;
    transform: translateY(-50%);
    transition: height .15s ease;
}

.vplayer-progress::before {
    right: 0;
    background-color: rgba(255, 255, 255, .28);
}

.vplayer-progress-fill {
    width: 0;
    background-color: var(--vplayer-accent);
}

.vplayer-progress-knob {
    position: absolute;
    top: 50%;
    left: 0;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: var(--vplayer-accent);
    box-shadow: 0 0 0 4px rgba(255, 152, 0, .25);
    transform: translate(-50%, -50%) scale(0);
    transition: transform .15s ease;
}

.vplayer-progress:hover::before,
.vplayer-progress:hover .vplayer-progress-fill,
.vplayer.is-seeking .vplayer-progress::before,
.vplayer.is-seeking .vplayer-progress-fill {
    height: 6px;
}

.vplayer-progress:hover .vplayer-progress-knob,
.vplayer-progress:focus-visible .vplayer-progress-knob,
.vplayer.is-seeking .vplayer-progress-knob {
    transform: translate(-50%, -50%) scale(1);
}

.vplayer-progress:focus-visible {
    outline: 0;
}

.vplayer-row {
    display: flex;
    align-items: center;
    gap: .35rem;
}

.vplayer-spacer {
    flex: 1;
}

.vplayer-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.2rem;
    height: 2.2rem;
    padding: 0 .35rem;
    border: 0;
    border-radius: .4rem;
    background: transparent;
    color: #fff;
    font-size: 1.3rem;
    font-weight: 700;
    transition: background-color .2s ease, color .2s ease;
}

.vplayer-btn:hover,
.vplayer-btn:focus-visible {
    background-color: rgba(255, 255, 255, .14);
    color: var(--vplayer-accent);
    outline: 0;
}

.vplayer-speed {
    font-size: .85rem;
}

.vplayer-time {
    margin-inline-start: .25rem;
    font-size: .82rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    opacity: .9;
}

/* The volume: a thin orange-filled slider. */
.vplayer-volume {
    --vplayer-volume: 100%;
    width: 5rem;
    height: 4px;
    margin: 0 .25rem;
    border-radius: 2px;
    background: linear-gradient(to right, var(--vplayer-accent) var(--vplayer-volume), rgba(255, 255, 255, .3) var(--vplayer-volume));
    cursor: pointer;
    appearance: none;
}

.vplayer-volume::-webkit-slider-thumb {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    appearance: none;
}

.vplayer-volume::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 50%;
    background: #fff;
}

.vplayer-speed-wrap {
    position: relative;
}

.vplayer-speed-menu {
    position: absolute;
    right: 0;
    bottom: calc(100% + .4rem);
    display: none;
    flex-direction: column;
    min-width: 6.5rem;
    padding: .3rem;
    border-radius: .5rem;
    background-color: rgba(20, 21, 27, .95);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .45);
}

.vplayer-speed-wrap.is-open .vplayer-speed-menu {
    display: flex;
}

/* Quality: the gear with a small HD / 4K badge (like YouTube's); in the menu the HD / 4K tags after the heights. */
.vplayer-quality {
    position: relative;
}

.vplayer-quality-badge {
    position: absolute;
    top: .1rem;
    right: 0;
    padding: 0 .2rem;
    border-radius: .2rem;
    background-color: var(--vplayer-accent);
    color: #fff;
    font-size: .55rem;
    font-weight: 700;
    line-height: 1.35;
}

.vplayer-quality-badge:empty {
    display: none;
}

.vplayer-quality-menu {
    min-width: 8.5rem;
}

.vplayer-quality-menu sup {
    margin-inline-start: .25rem;
    color: var(--vplayer-accent);
    font-size: .62rem;
    font-weight: 700;
}

.vplayer-quality-menu .vplayer-quality-now {
    margin-inline-start: .25rem;
    opacity: .6;
}

.vplayer-speed-menu button {
    padding: .35rem .7rem;
    border: 0;
    border-radius: .35rem;
    background: transparent;
    color: #e5e7eb;
    font-size: .85rem;
    text-align: start;
}

.vplayer-speed-menu button:hover,
.vplayer-speed-menu button:focus-visible {
    background-color: rgba(255, 255, 255, .1);
    outline: 0;
}

.vplayer-speed-menu button[aria-checked="true"] {
    color: var(--vplayer-accent);
    font-weight: 700;
}

@media (max-width: 575.98px) {
    .vplayer-big { width: 3.6rem; height: 3.6rem; font-size: 1.5rem; }
    .vplayer-volume { display: none; }
    .vplayer-bar { padding: 0 .5rem .35rem; }
    .vplayer-btn { min-width: 2rem; height: 2rem; font-size: 1.15rem; }
}

[dir="rtl"] .vplayer-big {
    padding: 0 .3rem 0 0;
}

/* Videos in the texts (Snow editor's video button: YouTube / Vimeo players): full width, responsive 16:9 — in the
   editor itself (the member's page shows the player above instead). */
.content-body > iframe,
.content-editor .ql-editor .ql-video {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    margin: .75rem 0;
    border: 0;
    border-radius: .4rem;
    background-color: #000;
}

/* Promo codes: codes are typed upper-case, but placeholders stay readable. */
input.text-uppercase::placeholder {
    text-transform: none;
}

.input-group > .promo-value-type {
    flex: 0 0 auto;
    width: auto;
    min-width: 190px;
}

/* Site Ayarları → Genel: each logo is previewed on the background it will be shown on. */
.logo-preview-box {
    display: flex;
    align-items: center;
    min-height: 76px;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid var(--bs-border-color);
}

.logo-preview-box-light {
    background: #ffffff;
}

.logo-preview-box-dark {
    background: #1e1f27;
}

.logo-preview {
    max-height: 60px;
    max-width: 100%;
    object-fit: contain;
}

/* Sidebar drop-down with a badge (pending receipts): badge pushed right, arrow right next to it. */
.side-nav-link .badge ~ .menu-arrow {
    margin-inline-start: .375rem;
}

/* Free trial: Satışlar, Veresiye, Raporlar, Gün Sonu in the sidebar — shown, faded, not clickable, a lock at the end. */
.side-nav-link.side-nav-link-locked {
    cursor: not-allowed;
    opacity: .45;
}

.side-nav-link.side-nav-link-locked:hover {
    color: inherit;
    background: transparent;
}

/* Yönetim → E-posta Gönder: the member / list pickers scroll inside a box. */
.email-pick-list {
    max-height: 260px;
    overflow-y: auto;
}

.email-pick-item {
    padding: .4rem .65rem;
    margin: 0;
    cursor: pointer;
    border-bottom: 1px solid var(--theme-border-color, rgba(255, 255, 255, .06));
}

.email-pick-item:last-child {
    border-bottom: 0;
}

.email-pick-item:hover {
    background: rgba(var(--theme-primary-rgb, 255, 152, 0), .06);
}

/* Ayarlar fields passive during the trial: clearly faded. */
fieldset.trial-locked,
div.trial-locked {
    opacity: .45;
    cursor: not-allowed;
}

/* Ayarlar tabs passive during the trial (QR Menü). */
.nav-link.nav-link-locked {
    cursor: not-allowed;
    opacity: .5;
}

/* Member panel sidebar (Masalar, Envanter, ...): larger text and icons than the admin one. */
.sidenav-member {
    --theme-sidenav-item-font-size: 1.0625rem;
    --theme-sidenav-item-icon-size: 1.375rem;
}

/* The selected item there: white background, dark text and icon (a light shadow keeps it visible on a light sidebar). */
.sidenav-member {
    --theme-sidenav-item-active-bg: #fff;
    --theme-sidenav-item-active-color: #1e1f27;
}

.sidenav-member .side-nav-link.active {
    background-color: #fff;
    color: #1e1f27;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .12);
}

.sidenav-member .side-nav-link.active .menu-icon,
.sidenav-member .side-nav-link.active .menu-text {
    color: #1e1f27;
}

/* Inside a drop-down (Envanter → Kategoriler / Ürünler): no background on the selected item, just a lighter text
   than the others (the group's own row keeps the white highlight). */
.sidenav-member .sub-menu .side-nav-link.active {
    background-color: transparent;
    box-shadow: none;
}

.sidenav-member .sub-menu .side-nav-link.active .menu-text {
    color: #fff;
    font-weight: 600;
}

/* No section heading above the first item there, so leave room under the logo. */
.sidenav-member .side-nav {
    padding-top: 1.25rem;
}

/* Items pinned to the bottom of the sidebar (Nasıl Kullanılır?): the sidebar is a column, the menu scrolls in the
   middle, these stay at the bottom under a thin line. */
.sidenav-member {
    display: flex;
    flex-direction: column;
}

.sidenav-member > .logo {
    flex-shrink: 0;
}

.sidenav-member > .scrollbar {
    flex: 1 1 auto;
    min-height: 0;
}

.sidenav-member .side-nav.side-nav-bottom {
    flex: 0 0 auto;
    margin: 0;
    padding-top: .75rem;
    padding-bottom: 1rem;
    border-top: 1px solid rgba(255, 255, 255, .08);
}

/* Masalar cards: compact, 6 a row on wide screens (dashboard/cafe/tables.php), all exactly 310 px high;
   when a busy card has more to show (staff call, QR orders), its middle part scrolls. */
.cafe-card {
    height: 350px;
}

.cafe-card .card-body {
    min-height: 0;
    overflow-y: auto;
}
.cafe-card .card-header,
.cafe-card .card-body,
.cafe-card .card-footer {
    padding: .5rem .625rem;
}

.cafe-card .card-title {
    font-size: .9375rem;
}

.min-w-0 {
    min-width: 0;
}

.cafe-card .badge {
    font-size: .6875rem;
    padding: .25rem .5rem;
}

/* Product pictures (CafeImageService, dashboard/cafe/_product_image.php): square, cropped to fit. */
.cafe-product-img {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: .5rem;
    object-fit: cover;
    background: var(--bs-tertiary-bg);
}

.cafe-product-img-lg {
    width: 72px;
    height: 72px;
}

.cafe-product-img-empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--bs-secondary-color);
    font-size: 1.125rem;
}

/* Envanter → Kategoriler: a wide thumbnail in the list (banner-shaped, like the QR menu), the picture's preview. */
.cafe-product-img.cafe-cat-img {
    width: 64px;
    height: 40px;
}

/* Kategoriler → edit card under the list: the jump to it (#kategori-duzenle) stops below the fixed topbar. */
#kategori-duzenle {
    scroll-margin-top: 90px;
}

.cafe-cat-preview {
    display: block;
    width: 100%;
    max-width: 420px;
    aspect-ratio: 4 / 1.3;
    object-fit: cover;
    border-radius: .75rem;
}

/* Masalar "Ürün Ekle" dialog: products as picture tiles. */
.cafe-product-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .25rem;
    width: 100%;
    height: 100%;
    padding: .5rem;
    text-align: center;
    white-space: normal;
}

.cafe-product-tile .cafe-product-img {
    width: 64px;
    height: 64px;
}

/* Guest QR menu (layouts/qr.php + qr/menu.php, light theme): phone-width column, dark cover header, bill card,
   category banners, picture product rows, floating order bar. Accent = the site's theme colour. */
.qr-page {
    --qr-accent: var(--theme-primary, #ff9800);
    --qr-accent-rgb: var(--theme-primary-rgb, 255, 152, 0);
    --qr-bg: #f4f5f7;
    --qr-surface: #fff;
    --qr-surface-2: #f1f2f5;
    --qr-line: rgba(17, 24, 39, .08);
    --qr-muted: #6b7280;
    background: var(--qr-bg);
    color: #1f2937;
    padding-bottom: 7rem;
    color-scheme: light;
}

.qr-container {
    max-width: 560px;
}

/* Header (layouts/qr.php): full width, the cover picture behind a dark shade (or a warm dark gradient without
   one), centred logo / name, the table, social links, hours and Wi-Fi; "Görevli Çağır" top right; zigzag edge. */
.qr-header {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 2.25rem 1rem 2.5rem;
    text-align: center;
    color: #fff;
    background: linear-gradient(160deg, #2a2118, #15161c 70%);
}

.qr-header-cover {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.qr-header::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(10, 8, 6, .62);
}

/* The bottom edge: small zigzag teeth in the page colour. */
.qr-header::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: -1px;
    height: 18px;
    background:
        linear-gradient(135deg, transparent 50%, var(--qr-bg) 50%) 0 0 / 18px 18px repeat-x,
        linear-gradient(-135deg, transparent 50%, var(--qr-bg) 50%) 0 0 / 18px 18px repeat-x;
}

.qr-header-inner {
    max-width: 560px;
    margin-inline: auto;
}

/* The cafe's logo in the QR menu header (instead of its name). */
.qr-logo {
    display: block;
    max-height: 56px;
    max-width: 70%;
    margin: .75rem auto 1.1rem; /* some air above and below */
    object-fit: contain;
}

.qr-header-name {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
}

.qr-header-table {
    margin-top: .5rem;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.qr-header-socials {
    display: flex;
    justify-content: center;
    gap: 1.4rem;
    margin-top: 1.25rem;
}

.qr-header-socials a {
    font-size: 1.45rem;
    line-height: 1;
    color: #fff;
}

.qr-header-socials a:hover {
    color: var(--qr-accent);
}

/* The table's bill in the header (qr/_bill.php): a glass card on the dark cover. */
.qr-bill.qr-bill-header {
    max-width: 520px;
    margin: 1.2rem auto 0;
    padding: 0;
    color: #fff;
    /* no card of its own: the total and the tiles sit straight on the header's cover */
    background: none;
    border: 0;
    box-shadow: none;
}

/* PlayStation tables: one controller icon per controller, side by side. */
.qr-controllers {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .3rem;
    font-size: 1.35rem;
    line-height: 1;
    color: var(--qr-accent);
}

.qr-bill-header .qr-bill-label,
.qr-bill-header .qr-stat-label,
.qr-bill-header .qr-stat-sub,
.qr-bill-header .qr-bill-note {
    color: rgba(255, 255, 255, .72);
}

/* The tiles and the total + controllers row: dark, see-through like a black window film (no frosted blur). */
.qr-bill-header .qr-bill-head {
    padding: .75rem 1rem;
    border-radius: .9rem;
    background: rgba(0, 0, 0, .5);
    border: 1px solid rgba(255, 255, 255, .06);
}

.qr-bill-header .qr-bill-stats {
    margin-top: .5rem; /* the same gap as between the tiles */
}

.qr-bill-header .qr-stat {
    background: rgba(0, 0, 0, .5);
    border: 1px solid rgba(255, 255, 255, .06);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

.qr-bill-header .qr-stat > .ti {
    background: rgba(var(--qr-accent-rgb), .22);
}
.qr-header-call {
    margin: 1.1rem 0 0;
}

.qr-header-call-btn {
    min-width: 200px;
    padding: .55rem 1.4rem;
    font-weight: 600;
    box-shadow: 0 6px 18px rgba(var(--qr-accent-rgb), .35);
}

/* Passive while the call is open: a dim glass button on the cover instead of the orange. */
.btn.qr-header-call-btn:disabled {
    opacity: 1;
    color: rgba(255, 255, 255, .55);
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .18);
    box-shadow: none;
}

/* QR menu buttons (Görevli Çağır, Sipariş Ver): the theme's primary colour, the site's 0.6rem corners. */
.btn.qr-btn {
    border-radius: .6rem;
}
/* Bill card: big total, stat tiles. */
.qr-bill {
    padding: 1.1rem;
    border-radius: 1.25rem;
    background: var(--qr-surface);
    border: 1px solid var(--qr-line);
}

.qr-bill-label {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--qr-muted);
}

.qr-bill-total {
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1.15;
    color: var(--qr-accent);
}

.qr-bill-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: .5rem;
    margin-top: .9rem;
}

.qr-stat {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .65rem .75rem;
    border-radius: .9rem;
    background: var(--qr-surface-2);
}

.qr-stat > .ti {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: .7rem;
    font-size: 1.15rem;
    color: var(--qr-accent);
    background: rgba(var(--qr-accent-rgb), .12);
}

.qr-stat-label {
    font-size: .6875rem;
    color: var(--qr-muted);
}

.qr-stat-value {
    font-weight: 700;
    white-space: nowrap;
}

.qr-stat-sub {
    font-size: .75rem;
    color: var(--qr-muted);
}

.qr-bill-note {
    margin-top: .75rem;
    font-size: .6875rem;
    color: var(--qr-muted);
}

.qr-pill {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .3rem .65rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
    color: var(--bs-info);
    background: rgba(var(--bs-info-rgb, 14, 165, 233), .14);
}

/* Action tiles ("Görevli Çağır"), panels ("Süre Uzat", orders), notices. */
.qr-action {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .85rem 1rem;
    border: 1px solid var(--qr-line);
    border-radius: 1.1rem;
    color: inherit;
    background: var(--qr-surface);
    text-align: start;
    transition: transform .1s ease;
}

.qr-action:active {
    transform: scale(.98);
}

.qr-action-warning {
    border-color: rgba(255, 193, 7, .35);
    background: linear-gradient(135deg, rgba(255, 193, 7, .16), transparent 70%), var(--qr-surface);
}

.qr-action-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: .85rem;
    font-size: 1.35rem;
    color: #2a1d00;
    background: #ffc107;
}

.qr-action-icon-info {
    color: #fff;
    background: var(--bs-info, #0ea5e9);
}

.qr-action-sub {
    font-size: .75rem;
    color: var(--qr-muted);
}

.qr-panel {
    padding: .9rem 1rem;
    border-radius: 1.1rem;
    background: var(--qr-surface);
    border: 1px solid var(--qr-line);
}

.qr-chip-btn {
    padding: .5rem .25rem;
    border-radius: 999px;
    font-weight: 700;
    color: var(--bs-info, #0ea5e9);
    background: rgba(var(--bs-info-rgb, 14, 165, 233), .12);
    border: 1px solid rgba(var(--bs-info-rgb, 14, 165, 233), .3);
}

.qr-chip-btn:hover,
.qr-chip-btn:focus {
    color: #fff;
    background: var(--bs-info, #0ea5e9);
}

/* "Süre Uzat" (timed tables): in the theme — the bill tiles' orange icon, orange buttons with the site's
   0.6rem corners (like Görevli Çağır / Sipariş Ver). */
.qr-extend .qr-action-icon {
    color: var(--qr-accent);
    background: rgba(var(--qr-accent-rgb), .14);
}

.qr-extend .qr-chip-btn {
    padding: .55rem .25rem;
    border-radius: .6rem;
    color: var(--qr-accent);
    background: rgba(var(--qr-accent-rgb), .08);
    border: 1px solid rgba(var(--qr-accent-rgb), .45);
}

.qr-extend .qr-chip-btn:hover,
.qr-extend .qr-chip-btn:focus {
    color: #fff;
    background: var(--qr-accent);
    border-color: var(--qr-accent);
}

.qr-notice {
    align-items: center;
    gap: .6rem;
    padding: .8rem 1rem;
    border-radius: 1.1rem;
}

.qr-notice > .ti {
    font-size: 1.4rem;
}

.qr-notice-warning {
    color: #8a5a00;
    background: rgba(255, 193, 7, .12);
    border: 1px solid rgba(255, 193, 7, .35);
}

/* Categories (qr-menu.js): picture banners — the category's first product picture behind a shade, the name
   in the middle; a mark on the ones with something chosen. */
.qr-cat-list {
    display: flex;
    flex-direction: column;
    gap: .65rem;
    margin-bottom: 1.25rem;
}

.qr-cat-tile {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 116px;
    padding: 1rem;
    overflow: hidden;
    border: 1px solid var(--qr-line);
    border-radius: 1.1rem;
    color: #fff;
    background: var(--qr-surface);
    isolation: isolate;
    transition: transform .1s ease;
}

.qr-cat-tile:active {
    transform: scale(.985);
}

.qr-cat-tile-img {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.qr-cat-tile:hover .qr-cat-tile-img {
    transform: scale(1.04);
}

.qr-cat-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(12, 13, 18, .5);
}

.qr-cat-tile-name {
    font-size: 1.6rem;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
    text-align: center;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .65);
}

.qr-cat-tile.qr-cat-picked {
    border-color: var(--qr-accent);
    box-shadow: 0 0 0 1px var(--qr-accent);
}

/* Inside a category: "← Kategoriler" and the category's name. */
.qr-section-head {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: .65rem;
}

.qr-section-head .qr-section-title {
    margin: 0;
}

/* A chosen category: the back button at the left, the category's name at the right. */
.qr-back:not([hidden]) + .qr-section-title {
    margin-inline-start: auto;
    font-size: 1.15rem;
    text-align: end;
}

/* Back to the categories: an icon-only theme button (btn btn-primary qr-btn). */
.btn.qr-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    padding: 0;
    font-size: 1.25rem;
    box-shadow: 0 4px 12px rgba(var(--qr-accent-rgb), .3);
}

.qr-back[hidden],
.qr-cat-list[hidden],
.qr-section[hidden] {
    display: none;
}
.qr-section {
    scroll-margin-top: 3.5rem;
    margin-bottom: 1.25rem;
}

.qr-section-title {
    margin: 0 0 .65rem;
    font-size: 1rem;
    font-weight: 800;
}

/* Products: full-width banner rows — the picture behind a dark shade, the name on the left, the price box
   (theme colour) with the stepper under it on the right; a chosen one is outlined. */
.qr-products {
    display: flex;
    flex-direction: column;
    gap: .65rem;
}

.qr-product {
    position: relative;
    overflow: hidden;
    min-height: 118px;
    border-radius: 1.1rem;
    background: var(--qr-surface);
    border: 1px solid var(--qr-line);
    isolation: isolate;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.qr-product:has(.qr-stepper-active) {
    border-color: var(--qr-accent);
    box-shadow: 0 0 0 1px var(--qr-accent), 0 8px 22px rgba(var(--qr-accent-rgb), .18);
}

/* The picture fills the row; the shade keeps the name readable. */
.qr-product-img {
    position: absolute;
    inset: 0;
    z-index: -2;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.qr-product::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, rgba(12, 13, 18, .88) 0%, rgba(12, 13, 18, .62) 55%, rgba(12, 13, 18, .35) 100%);
}

.qr-product-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    min-height: 118px;
    padding: .85rem .85rem .85rem 1.1rem;
}

.qr-product-name {
    min-width: 0;
    font-size: 1.125rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 1px 6px rgba(0, 0, 0, .6);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Right column: price box, the stepper under it. */
.qr-product-side {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: .45rem;
    min-width: 128px; /* grows for long prices (1.250,00 ₺) */
}

.qr-product-price {
    text-align: center;
    white-space: nowrap;
    font-size: 2.4rem;
    font-weight: 900;
    line-height: 1.1;
    color: var(--qr-accent);
    /* the bill's black window film (.qr-bill-head / .qr-stat) */
    padding: .3rem .7rem;
    border-radius: .9rem;
    background: rgba(0, 0, 0, .5);
    border: 1px solid rgba(255, 255, 255, .06);
}

/* Plain (white) rows: see-through black would turn grey here, so the film's look on the dark header, solid. */
.qr-product-plain .qr-product-price {
    background: #120f0c;
}

.qr-price-cents {
    top: -.55em;
    margin-inline-start: 1px;
    font-size: .55em;
    font-weight: 800;
}

/* Small amounts (the bill's tiles): the kuruş a little less small, so they stay readable. */
.qr-stat .qr-price-cents {
    top: -.45em;
    font-size: .7em;
}

/* The tiles' two amounts (Oyun süresi's fee, Ürünler) in one size. */
.qr-stat [data-qr-bill="items"],
.qr-stat [data-qr-bill="time"] {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
}

.qr-price-sign {
    margin-inline-start: .08em;
    font-size: .8em;
    font-weight: 800;
}

.qr-product .qr-stepper {
    color: #fff;
    background: rgba(12, 13, 18, .7);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}
.qr-stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding: .2rem;
    border-radius: 999px;
    background: var(--qr-surface-2);
}

.qr-stepper button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: inherit;
    background: rgba(17, 24, 39, .07);
}

.qr-stepper button[data-step="1"] {
    color: #1a1206;
    background: var(--qr-accent);
}

.qr-stepper input {
    width: 2.5rem;
    padding: 0;
    border: 0;
    text-align: center;
    font-weight: 700;
    color: inherit;
    background: transparent;
    -moz-appearance: textfield;
}

.qr-stepper input:focus {
    outline: none;
}

.qr-stepper input::-webkit-inner-spin-button,
.qr-stepper input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.qr-stepper-active input {
    color: var(--qr-accent);
}

/* Light theme, no picture: a plain banner / row — no dark shade, dark text. */
.qr-cat-tile.qr-cat-tile-plain,
.qr-product.qr-product-plain {
    color: #1f2937;
    background: var(--qr-surface);
}

.qr-cat-tile.qr-cat-tile-plain::after,
.qr-product.qr-product-plain::after {
    display: none;
}

.qr-cat-tile-plain .qr-cat-tile-name,
.qr-product-plain .qr-product-name {
    color: #1f2937;
    text-shadow: none;
}

.qr-product-plain .qr-stepper {
    color: inherit;
    background: var(--qr-surface-2);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

/* Cards on the light page: a soft shadow instead of the dark theme's outline. */
.qr-bill,
.qr-panel,
.qr-cat-tile,
.qr-product {
    box-shadow: 0 2px 10px rgba(17, 24, 39, .06);
}

/* Floating order bar. */
.qr-order-bar {
    position: fixed;
    inset-inline: .75rem;
    bottom: .75rem;
    z-index: 10;
    margin-inline: auto;
    max-width: 536px;
    padding: .65rem .65rem .65rem 1.1rem;
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, .95);
    border: 1px solid rgba(var(--qr-accent-rgb), .35);
    box-shadow: 0 10px 30px rgba(17, 24, 39, .15);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.qr-order-bar-label {
    font-size: .6875rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--qr-muted);
}

.qr-order {
    border-inline-start: 3px solid rgba(var(--qr-accent-rgb), .6);
}

/* Closed table page (qr/closed.php). */
.qr-closed-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 1.25rem;
    font-size: 1.9rem;
    color: var(--qr-accent);
    background: rgba(var(--qr-accent-rgb), .14);
}

/* Topbar sound button (panel-sounds.js): blinks while the browser still blocks sound — one click unlocks it. */
.sound-locked .topbar-link-icon {
    color: var(--bs-warning);
    animation: sound-locked-blink 1s steps(2, start) infinite;
}

@keyframes sound-locked-blink {
    to { visibility: hidden; }
}

@media (prefers-reduced-motion: reduce) {
    .sound-locked .topbar-link-icon {
        animation: none;
    }
}

/* Masalar card picture for Bilardo / Okey / VR tables: the business type's icon in the picture's place. */
.cafe-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.25rem;
    color: var(--bs-primary);
}

/* Busy Masalar card: info left, action buttons in a column on the right (tables.php). The body doesn't scroll
   here, so the right column's menus (Süre, Kol, Taşı; dropstart) aren't clipped. */
.cafe-card .card-body.cafe-card-split {
    overflow: visible;
}

/* "Taşı": many free tables scroll inside the menu instead of running off the page. */
.cafe-move-menu {
    max-height: 280px;
    overflow-y: auto;
}

/* Free Masalar card: stays in the background (thin, faded border; faded icon) so busy tables stand out. */
.cafe-card.cafe-card-free {
    border-color: color-mix(in srgb, var(--theme-success, #22c55e) 35%, transparent) !important;
}

/* Free card: the table's icon (green, no background). */
/* One size for the table's picture on every Masalar card (free and busy, icon or photo). */
.cafe-card {
    --cafe-pic-size: 84px;
    --cafe-pic-icon: 3.75rem;
}

/* Free and busy cards: content starts at the same height, so the pictures line up. */
.cafe-card .card-body.cafe-card-pic-top {
    padding-top: 1.5rem;
}

.cafe-free-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--cafe-pic-size);
    height: var(--cafe-pic-size);
    font-size: var(--cafe-pic-icon);
    line-height: 1;
    color: var(--theme-success, #22c55e);
}

/* Free card: controller count pills above the time choice (PlayStation). */
/* Only the controller icon: empty (outline) until chosen. */
.cafe-free-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border-radius: 50% !important;
    font-size: .8125rem;
    line-height: 1;
}

/* Free card: the round start button, a little smaller than the template's icon button. */
.btn.cafe-free-start {
    width: 32px;
    height: 32px;
    padding: 0;
    font-size: .875rem;
}

/* The ones below the chosen controller count look exactly like the chosen (checked) one (cafe-tables.js). */
.cafe-free-pill.cafe-free-pill-on,
.cafe-free-pill.cafe-free-pill-on:hover,
.cafe-free-pill.cafe-free-pill-on:focus {
    color: var(--theme-btn-active-color, #fff);
    background-color: var(--theme-btn-active-bg);
    border-color: var(--theme-btn-active-border-color);
    box-shadow: none;
}

/* Masalar: success / error notice in the topbar, next to the menu button (layouts/dashboard.php $flashInTopbar). */
.alert.topbar-flash {
    margin: 0;
    padding: .375rem .75rem;
    font-size: .8125rem;
    max-width: min(560px, 50vw);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 575.98px) {
    .alert.topbar-flash {
        max-width: 45vw;
    }
}

/* Phones / small tablets: the notice floats at the bottom of the screen instead of sitting in the topbar,
   so nothing on the page moves when it appears or goes away. */
@media (max-width: 767.98px) {
    .alert.topbar-flash {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        z-index: 1080;
        max-width: none;
        white-space: normal;
        /* The alert colour is see-through; laid over the solid card colour so the page below doesn't show. */
        background: linear-gradient(var(--theme-alert-bg), var(--theme-alert-bg)), var(--theme-secondary-bg);
        box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .35);
        pointer-events: none;
    }
}

/* Busy card: the icon box only as tall as the icon, so the play time sits right under it. */
/* display:flex again — .cafe-card-img (later in this file) sets display:block, which put the glyph at the top. */
.cafe-card-icon.cafe-card-icon-tight {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: auto;
    height: var(--cafe-pic-size);
    font-size: var(--cafe-pic-icon);
    line-height: 1;
}

/* Masalar card: a guest called for technical support (QR menu) — pulses until the staff clicks it. */
.cafe-call-alert {
    animation: cafe-call-pulse 1.4s ease-in-out infinite;
}

@keyframes cafe-call-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 170, 0, .6); }
    50% { box-shadow: 0 0 0 6px rgba(255, 170, 0, 0); }
}

/* Masalar card: new QR orders waiting for approval — pulses red like the support call. */
.cafe-order-alert {
    animation: cafe-order-pulse 1.4s ease-in-out infinite;
}

/* Masalar card: a guest asked for more time (QR menu "Süre Uzat") — pulses in the skin's info colour. */
.cafe-extend-alert {
    animation: cafe-extend-pulse 1.4s ease-in-out infinite;
}

@keyframes cafe-extend-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(14, 165, 233, .6);
        box-shadow: 0 0 0 0 color-mix(in srgb, var(--theme-info, #0ea5e9) 60%, transparent);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(14, 165, 233, 0);
        box-shadow: 0 0 0 6px color-mix(in srgb, var(--theme-info, #0ea5e9) 0%, transparent);
    }
}

/* The skin's red (--theme-danger; Paces has no --bs-danger-rgb), with a plain red fallback. */
@keyframes cafe-order-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, .6);
        box-shadow: 0 0 0 0 color-mix(in srgb, var(--theme-danger, #ef4444) 60%, transparent);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
        box-shadow: 0 0 0 6px color-mix(in srgb, var(--theme-danger, #ef4444) 0%, transparent);
    }
}

/* Timed table whose time is up (tables.php, cafe-tables.js): the remaining-time line blinks red. */
.cafe-time-up [data-cafe-left] {
    animation: cafe-time-up-blink 1s steps(2, start) infinite;
}

@keyframes cafe-time-up-blink {
    to { visibility: hidden; }
}

@media (prefers-reduced-motion: reduce) {
    .cafe-call-alert,
    .cafe-order-alert,
    .cafe-extend-alert,
    .cafe-time-up [data-cafe-left] {
        animation: none;
    }
}

/* Ayarlar → QR Menü (dashboard/cafe/settings/qr.php, cafe-qr.js). */
.qr-canvas {
    width: 180px;
    max-width: 100%;
    aspect-ratio: 1;
}

/* Ayarlar → QR Menü list: a small QR per table row. */
.qr-canvas.qr-list-qr {
    width: 40px;
}

/* Ayarlar → QR Menü "Yazdırma Önizlemesi": one printed table card at scale (66 × 116 mm on paper → 220 px wide,
   3.33 px a mm): the page colour, a solid cut line, logo, QR, table name, hint — like the print rules below. */
.qr-paper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 220px;
    max-width: 100%;
    aspect-ratio: 66 / 116;
    padding: 12px;
    border: 2px solid #6b7280;
    border-radius: 13px;
    background: var(--qr-page, #fff); /* "Sayfa Rengi" (cafe-qr.js) */
    color: var(--qr-page-text, #111827);
    text-align: center;
}

.qr-paper-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    margin-bottom: 13px;
}

.qr-paper-brand img {
    max-width: 150px;
    max-height: 40px;
    object-fit: contain;
}

.qr-paper-brand span {
    font-size: 15px;
    font-weight: 800;
}

.qr-canvas.qr-paper-qr {
    width: 103px;
}

.qr-paper-table {
    margin-top: 13px;
    font-size: 16.5px;
    font-weight: 800;
    line-height: 1.2;
}

.qr-paper-hint {
    margin-top: 5px;
    font-size: 9.5px;
    color: var(--qr-page-muted, #6b7280);
}

.qr-canvas canvas,
.qr-canvas img {
    max-width: 100%;
    height: auto;
}

/* Parts of the QR cards that only appear on paper (business logo, "scan" hint). */
.qr-print-only {
    display: none;
}

/* "Tümünü Yazdır": 6 table cards an A4 page (3 across, 2 down), each half a page tall — logo on top, the QR,
   the table name, a short hint — with thick solid cut lines. Always white paper with dark text, whatever the
   panel theme. */
@media print {
    /* A4 (otherwise the dialog may start on Letter, 18 mm shorter) and no printer margin (it would show the dark
       panel background); the content keeps its own. */
    @page {
        size: A4 portrait;
        margin: 0;
    }

    .qr-print-hide,
    .sidenav-menu,
    .app-topbar,
    .footer,
    .page-title-head,
    .alert {
        display: none !important;
    }

    html,
    body,
    .wrapper,
    .content-page {
        background: #fff !important;
    }

    .content-page {
        margin: 0 !important;
        padding: 8mm !important;
    }

    /* The page's own flex row (settings column + cards) would be pushed whole to page 2: plain blocks instead. */
    .qr-print-root {
        display: block !important;
        margin: 0 !important;
    }

    .qr-print-root > [class*="col-"] {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
    }

    /* Inline blocks rather than flex: Chrome splits wrapped flex rows across pages (one row a page). */
    .qr-print-grid {
        display: block !important;
        margin: 0 !important;
        font-size: 0;
    }

    /* Two rows of 120 mm (+ 2 × 8 mm page padding = 256 mm) fit an A4 page (297 mm) with room to spare — also when a
       browser adds its own margins or the paper is Letter (279 mm); a tighter fit makes Chrome push even the first
       row to page 2. A third row goes to the next page. */
    .qr-print-item {
        display: inline-block !important;
        width: 33.333% !important;
        max-width: 33.333% !important;
        height: 120mm;
        padding: 2mm !important;
        font-size: 1rem;
        vertical-align: top;
        break-inside: avoid;
    }

    .qr-print-card {
        margin: 0 !important;
        height: 100%;
        border: 2.5px solid #6b7280 !important;
        border-radius: 4mm !important;
        background: var(--qr-page, #fff) !important; /* "Sayfa Rengi" (cafe-qr.js); texts follow --qr-page-text */
        box-shadow: none !important;
        color: var(--qr-page-text, #111827) !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .qr-print-card .card-body {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: 100%;
        padding: 5mm 4mm !important;
    }

    .qr-print-only {
        display: block !important;
    }

    .qr-print-brand {
        display: flex !important;
        align-items: center;
        justify-content: center;
        height: 12mm;
        margin-bottom: 4mm;
    }

    .qr-print-brand img {
        max-width: 45mm;
        max-height: 12mm;
        object-fit: contain;
    }

    .qr-print-brand span {
        color: var(--qr-page-text, #111827);
        font-size: 12pt;
        font-weight: 800;
    }

    .qr-print-card .qr-canvas {
        width: 31mm !important;
        height: 31mm !important;
        margin: 0 auto;
    }

    .qr-print-card .qr-canvas canvas {
        width: 100% !important;
        height: 100% !important;
    }

    .qr-print-table {
        margin-top: 4mm !important;
        color: var(--qr-page-text, #111827) !important;
        font-size: 14pt !important;
        font-weight: 800 !important;
    }

    .qr-print-hint {
        margin-top: 1.5mm;
        color: var(--qr-page-muted, #6b7280) !important;
        font-size: 8pt;
    }
}

/* Controller picture (assets/dashboard/images/cafe-controller.webp, 3:2, transparent). */
.cafe-card-img {
    display: block;
    width: 100%;
    max-width: 130px;
    margin-inline: auto;
    aspect-ratio: 3 / 2;
    object-fit: contain;
}

/* Yönetim → Anasayfa İçeriği: an item's icon in its card color (--biz-rgb set inline). */
.home-admin-icon {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: .7rem;
    background: linear-gradient(135deg, rgb(var(--biz-rgb)), rgba(var(--biz-rgb), .7));
    color: #fff;
    font-size: 1.25rem;
}

/* Panel theme color: #ff9800 (same as the public site, see site.css). Scoped to the panel layout
   (only its <html> has data-i18n) and the guest QR menu (html.qr-theme); the login pages keep the template color.
   The template's buttons, nav pills and focus rings carry fixed colors, so they are restated here. */
html[data-i18n],
html.qr-theme {
    --theme-primary: #ff9800;
    --theme-primary-rgb: 255, 152, 0;
    --theme-primary-text-emphasis: #c77700;
    --theme-primary-bg-subtle: #fff3e0;
    --theme-primary-border-subtle: #ffd699;
    --theme-link-color: #e68900;
    --theme-link-color-rgb: 230, 137, 0;
    --theme-link-hover-color: #c77700;
    --theme-link-hover-color-rgb: 199, 119, 0;
    --theme-chart-primary: #ff9800;
    --theme-chart-primary-rgb: 255, 152, 0;
    --theme-sidenav-item-hover-color: #ff9800;
    --theme-sidenav-item-active-color: #ff9800;
    --theme-topbar-item-hover-color: #ff9800;
}

html[data-i18n][data-bs-theme=dark],
html.qr-theme[data-bs-theme=dark] {
    --theme-primary-text-emphasis: #ffb74d;
    --theme-primary-bg-subtle: rgba(255, 152, 0, .2);
    --theme-primary-border-subtle: #995b00;
    --theme-link-color: #ffb74d;
    --theme-link-color-rgb: 255, 183, 77;
    --theme-link-hover-color: #ffc777;
    --theme-link-hover-color-rgb: 255, 199, 119;
}

html[data-i18n] .btn-primary,
html.qr-theme .btn-primary {
    --theme-btn-color: #fff;
    --theme-btn-bg: #ff9800;
    --theme-btn-border-color: #ff9800;
    --theme-btn-hover-color: #fff;
    --theme-btn-hover-bg: #f08c00;
    --theme-btn-hover-border-color: #f08c00;
    --theme-btn-focus-shadow-rgb: 255, 167, 38;
    --theme-btn-active-color: #fff;
    --theme-btn-active-bg: #e68900;
    --theme-btn-active-border-color: #e68900;
    --theme-btn-disabled-color: #fff;
    --theme-btn-disabled-bg: #ff9800;
    --theme-btn-disabled-border-color: #ff9800;
}

html[data-i18n] .btn-outline-primary {
    --theme-btn-color: #ff9800;
    --theme-btn-border-color: #ff9800;
    --theme-btn-hover-color: #fff;
    --theme-btn-hover-bg: #ff9800;
    --theme-btn-hover-border-color: #ff9800;
    --theme-btn-focus-shadow-rgb: 255, 152, 0;
    --theme-btn-active-color: #fff;
    --theme-btn-active-bg: #ff9800;
    --theme-btn-active-border-color: #ff9800;
    --theme-btn-disabled-color: #ff9800;
    --theme-btn-disabled-border-color: #ff9800;
}

html[data-i18n] .btn-link {
    --theme-btn-focus-shadow-rgb: 255, 167, 38;
}

html[data-i18n] .nav-pills-primary {
    --theme-nav-pills-link-active-bg: #ff9800;
    --theme-nav-link-hover-color: #ff9800;
}

html[data-i18n] .form-control:focus,
html[data-i18n] .form-select:focus {
    border-color: rgba(255, 152, 0, .55);
    box-shadow: 0 0 0 .2rem rgba(255, 152, 0, .15);
}

html[data-i18n] .form-check-input:focus {
    border-color: rgba(255, 152, 0, .55);
    box-shadow: 0 0 0 .2rem rgba(255, 152, 0, .15);
}

html[data-i18n] .form-check-input:checked {
    background-color: #ff9800;
    border-color: #ff9800;
}

/* Login / register / error pages on phones (layouts/auth.php, errors/_layout.php): the template's 50 px .auth-box
   padding plus the card's own left the form ~270 px wide on a 390 px screen. Room only for the language menu
   above; a slimmer card padding. */
@media (max-width: 575.98px) {
    .auth-box {
        padding: 64px 0 24px;
    }

    .auth-box .card.p-4 {
        padding: 1.25rem !important;
    }
}

/* Settings tabs (Site Ayarları, Ayarlar, translations) on narrow screens: one row that scrolls sideways
   instead of wrapping onto 2-3 lines. */
@media (max-width: 767.98px) {
    .nav-tabs.nav-bordered {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
    }

    .nav-tabs.nav-bordered::-webkit-scrollbar {
        display: none;
    }

    .nav-tabs.nav-bordered .nav-link {
        white-space: nowrap;
    }
}

/* Ad area for free-plan members (partials/ad-slot.php) on "Masalar" and the QR menu: the standard banner size —
   728×90 on computers and tablets, 468×60 on phones (never wider than the screen) — centred, with a small
   "Reklam" label in the corner. The picture fills the box. */
.ad-slot {
    position: relative;
    overflow: hidden;
    width: 728px;
    max-width: 100%;
    aspect-ratio: 728 / 90;
    margin-inline: auto;
    border-radius: .35rem;
}

@media (max-width: 575.98px) {
    .ad-slot {
        width: 468px;
        aspect-ratio: 468 / 60;
    }
}

.ad-slot > a,
.ad-slot-image {
    display: block;
    width: 100%;
    height: 100%;
}

.ad-slot-image {
    object-fit: cover;
}

/* No ad of ours running: the built-in "advertise here" banner, linking to the site's contact page.
   (.ad-slot > …: stronger than ".ad-slot > a { display: block }" above.) */
.ad-slot > .ad-slot-house {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .9rem;
    width: 100%;
    height: 100%;
    padding: 0 1.25rem;
    background: linear-gradient(135deg, #1e1f27, #2b2c36);
    color: #fff;
    text-decoration: none;
}

.ad-slot-house:hover {
    color: #fff;
}

.ad-slot-house > i {
    flex-shrink: 0;
    color: #ff9800;
    font-size: 2rem;
}

.ad-slot-house-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.25;
}

.ad-slot-house-text strong {
    font-size: 1.05rem;
}

.ad-slot-house-text small {
    color: #c7cbd6;
    font-size: .8rem;
}

.ad-slot-house-btn {
    flex-shrink: 0;
    padding: .4rem .9rem;
    border-radius: .3rem;
    background-color: #ff9800;
    color: #fff;
    font-size: .85rem;
    font-weight: 700;
}

@media (max-width: 575.98px) {
    .ad-slot > .ad-slot-house { gap: .5rem; padding: 0 3.6rem 0 .6rem; } /* right: room for the "Reklam" label */
    .ad-slot-house > i { font-size: 1.4rem; }
    .ad-slot-house-text strong { font-size: .85rem; }
    .ad-slot-house-text small { display: none; }
    .ad-slot-house-btn { padding: .25rem .55rem; font-size: .72rem; }
}

.ad-slot-label {
    background-color: rgba(0, 0, 0, .55);
    border-radius: .35rem;
    color: #fff;
    font-size: .65rem;
    font-weight: 600;
    letter-spacing: .03em;
    padding: .1rem .4rem;
    pointer-events: none;
    position: absolute;
    right: .5rem;
    top: .5rem;
    z-index: 1;
}

.ad-slot-adsense {
    display: block;
    width: 100%;
    height: 100%;
}

/* Planım → plan picker (dashboard/subscription/_plans.php): the public site's plan cards (site.css .site-plan) — dark
   cards side by side, the "En Popüler" one darker with an orange top edge and a little taller (desktop); the name in
   italic capitals with a short bar under it, the price and a square button at the bottom. Fixed colors (not the
   panel theme's), so they look the same in light and dark mode. */
.member-plans-row {
    max-width: 1140px;
    margin-inline: auto;
}

.member-plan {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 2.5rem 2rem;
    background-color: #272833;
    color: #aeb3c0;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .25);
}

@media (min-width: 992px) {
    .member-plans-row {
        padding-top: 1.75rem; /* room for the taller popular card */
        padding-bottom: 1.75rem;
    }

    /* Taller than the others at the top and at the bottom; its price and button stay level with theirs. */
    .member-plan.is-featured {
        height: calc(100% + 3.5rem);
        margin-top: -1.75rem;
        padding-top: 3.5rem;
        padding-bottom: 4.25rem; /* 2.5rem like the others + the 1.75rem it reaches lower */
    }
}

@media (max-width: 991.98px) {
    .member-plans-row {
        row-gap: 1.25rem;
    }
}

.member-plan.is-featured {
    z-index: 1;
    border-top: 3px solid #ff9800;
    background-color: #1e1f27;
    color: #c7cbd6;
    box-shadow: 0 24px 50px rgba(0, 0, 0, .3);
}

.member-plan-name {
    position: relative;
    margin: 0 0 1rem;
    padding-bottom: .65rem;
    color: #fff;
    font-size: 1.85rem;
    font-weight: 800;
    font-style: italic;
    text-transform: uppercase;
}

.member-plan-name::after {
    content: "";
    position: absolute;
    bottom: 0;
    inset-inline-start: 0;
    width: 56px;
    height: 4px;
    border-radius: 2px;
    background-color: #fff;
}

.member-plan.is-featured .member-plan-name {
    color: #ff9800;
}

.member-plan.is-featured .member-plan-name::after {
    background-color: #ff9800;
}

.member-plan-desc {
    margin: 0 0 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    font-size: .92rem;
}

.member-plan-features {
    margin: 0 0 2rem;
    padding: 0;
    list-style: none;
}

.member-plan-features li {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    margin-bottom: .55rem;
    color: #e5e7eb;
    font-size: 1rem;
}

.member-plan-features i {
    flex-shrink: 0;
    margin-top: .1rem;
    color: #10b981;
    font-size: 1.25rem;
}

.member-plan.is-featured .member-plan-features li {
    color: #fff;
}

.member-plan.is-featured .member-plan-features i {
    color: #ff9800;
}

.member-plan-price {
    margin-top: auto;
    margin-bottom: 1.25rem;
}

.member-plan-amount {
    display: block;
    color: #fff;
    font-size: 2.4rem;
    font-weight: 800;
    font-style: italic;
    line-height: 1.1;
    white-space: nowrap;
}

.member-plan.is-featured .member-plan-amount {
    color: #ff9800;
}

.member-plan-period {
    font-size: .9rem;
}

/* The button: a light tint on the dark card, turning orange on hover; the popular plan's orange, a deeper orange on
   hover — softly. */
.member-plan-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: .9rem 1rem;
    background-color: rgba(255, 255, 255, .08);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    text-decoration: none;
    transition: color .3s ease, background-color .3s ease, filter .3s ease;
}

.member-plan-btn:hover,
.member-plan-btn:focus-visible {
    color: #fff;
    background-color: #ff9800;
}

.member-plan.is-featured .member-plan-btn {
    background-color: #ff9800;
}

.member-plan.is-featured .member-plan-btn:hover,
.member-plan.is-featured .member-plan-btn:focus-visible {
    filter: brightness(.9);
}

/* The free trial plan: never bought — passive: dimmed and grey, a grey top edge, an outlined mark ("Kullanımda" /
   "Kullanıldı") in place of the button, nothing reacts to the mouse. */
.member-plan.is-passive {
    border-top: 3px solid #4b4d5a;
    filter: grayscale(1);
    cursor: not-allowed;
}

.member-plan.is-passive > * {
    opacity: .55;
}

.member-plan-btn.is-passive,
.member-plan-btn.is-passive:hover {
    border: 2px solid rgba(255, 255, 255, .25);
    background-color: transparent;
    color: #aeb3c0;
    cursor: not-allowed;
}

@media (max-width: 575.98px) {
    .member-plan { padding: 2rem 1.5rem; }
    .member-plan-amount { font-size: 2rem; }
}
