/*
 * Sattaking.live responsive safety layer.
 * Loaded after the legacy theme so it can fix device-fit issues without
 * changing PHP/database/SEO behavior.
 */
:root {
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --page-pad: clamp(10px, 2.8vw, 24px);
    --tap-size: 44px;
    --header-base-height: 104px;
    --bottom-nav-height: 78px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden !important;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    -webkit-overflow-scrolling: touch;
}

html {
    scroll-padding-top: calc(var(--header-base-height) + var(--safe-top) + 10px);
}

body {
    overscroll-behavior-x: none;
    padding-top: calc(var(--header-base-height) + var(--safe-top)) !important;
    padding-right: max(0px, var(--safe-right));
    padding-bottom: calc(var(--bottom-nav-height) + var(--safe-bottom) + 14px) !important;
    padding-left: max(0px, var(--safe-left));
}

img,
picture,
video,
canvas,
svg,
iframe {
    max-width: 100%;
}

img,
picture,
video,
canvas,
svg {
    height: auto;
}

img {
    display: block;
}

a,
button,
input,
select,
textarea,
.btn,
[role="button"] {
    min-height: var(--tap-size);
    touch-action: manipulation;
}

button,
.btn,
.nav-btn,
.agent-action-btn,
.owner-action-btn {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}

section,
main,
header,
footer,
.container,
.container-fluid,
.row,
.card,
.service-card,
.blog-card,
.hero,
.hero-content,
.active-games,
.result-card,
.game-card,
.dashboard-container {
    max-width: 100%;
}

.container,
.container-fluid {
    padding-right: var(--page-pad);
    padding-left: var(--page-pad);
}

.row {
    --bs-gutter-x: min(1.5rem, 4vw);
}

h1,
.h1 {
    font-size: clamp(1.55rem, 5.4vw, 3.25rem);
    line-height: 1.12;
}

h2,
.h2 {
    font-size: clamp(1.35rem, 4.6vw, 2.5rem);
    line-height: 1.18;
}

h3,
.h3 {
    font-size: clamp(1.12rem, 3.6vw, 1.75rem);
    line-height: 1.22;
}

h4,
h5,
h6,
.card-title,
.hero-info-message,
p,
li,
.card-text,
.accordion-body,
.blog-content {
    overflow-wrap: anywhere;
}

p,
li,
.card-text,
.accordion-body,
.blog-content {
    line-height: 1.55;
}

.fixed-header {
    top: 0 !important;
    right: 0 !important;
    left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding-top: var(--safe-top);
    contain: layout paint;
    transform: translateZ(0) !important;
    backface-visibility: hidden;
}

.fixed-header .info-line,
.fixed-header .blinking-website-name {
    max-width: 100%;
}

.fixed-header .blinking-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: calc(100vw - 20px - var(--safe-left) - var(--safe-right));
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hero {
    min-height: auto !important;
    padding-inline: 0;
}

.hero-content {
    width: min(100%, 1280px);
    margin-inline: auto;
    padding-inline: var(--page-pad);
}

.active-games .row,
#blogs .row,
#services .row,
#owners .row,
#questions .row,
#agents .row,
#agents2 .row {
    row-gap: clamp(12px, 2vw, 24px);
}

.card,
.service-card,
.accordion-item,
.agent-showcase-card,
.owner-orbit-card,
.card-body {
    min-width: 0;
}

.card,
.service-card,
.accordion-item,
.agent-showcase-card,
.owner-orbit-card {
    overflow: hidden;
}

#blogs .card-img-top {
    width: calc(100% - 16px) !important;
    height: auto !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
    display: block;
    background: #090703;
}

#blogs .service-card {
    height: 100%;
}

#blogs .card-title {
    font-size: clamp(1rem, 3.8vw, 1.22rem);
}

#blogs .card-text {
    font-size: clamp(0.92rem, 3.4vw, 1rem);
}

.table-responsive,
.monthly-scroll-cue {
    width: 100%;
    max-width: 100%;
    overflow-x: auto !important;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-inline: contain;
}

.table-responsive table,
.monthly-scroll-cue table,
table {
    max-width: 100%;
}

th,
td {
    overflow-wrap: anywhere;
}

.fixed-bottom-nav {
    right: max(8px, var(--safe-right)) !important;
    bottom: max(8px, var(--safe-bottom)) !important;
    left: max(8px, var(--safe-left)) !important;
    width: auto !important;
    max-width: calc(100vw - 16px - var(--safe-left) - var(--safe-right)) !important;
    overflow-x: hidden !important;
    gap: clamp(4px, 1.2vw, 10px);
    padding-bottom: max(6px, calc(var(--safe-bottom) * 0.25)) !important;
    contain: layout paint;
}

.fixed-bottom-nav .nav-btn {
    min-width: 0 !important;
    min-height: var(--tap-size);
    flex: 1 1 0;
    padding-inline: clamp(6px, 2vw, 14px) !important;
}

.fixed-bottom-nav .btn-label {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.floating-agent-whatsapp {
    right: calc(14px + var(--safe-right)) !important;
    bottom: calc(14px + var(--safe-bottom)) !important;
    max-width: calc(100vw - 28px - var(--safe-left) - var(--safe-right));
    min-height: var(--tap-size);
    min-width: var(--tap-size);
    z-index: 4800;
}

.language-switcher--floating {
    right: calc(14px + var(--safe-right)) !important;
    bottom: calc(78px + var(--safe-bottom)) !important;
    z-index: 4801;
}

.install-fab,
.language-floating-button,
.scroll-top,
.floating-button {
    max-width: calc(100vw - 20px - var(--safe-left) - var(--safe-right));
}

.modal,
.modal-dialog,
.modal-content {
    max-width: 100%;
}

.modal-dialog {
    margin-inline: var(--page-pad);
}

@media (max-width: 1280px) {
    .hero-content,
    .container,
    .container-fluid {
        max-width: 100%;
    }
}

@media (max-width: 1024px) {
    :root {
        --header-base-height: 98px;
        --bottom-nav-height: 76px;
    }

    .card,
    .service-card {
        box-shadow: 0 10px 22px rgba(55, 36, 7, 0.12);
    }
}

@media (max-width: 768px) {
    :root {
        --page-pad: clamp(8px, 3.2vw, 16px);
        --header-base-height: 92px;
        --bottom-nav-height: 72px;
    }

    body {
        padding-bottom: calc(var(--bottom-nav-height) + var(--safe-bottom) + 18px) !important;
    }

    .container,
    .container-fluid,
    .hero-content {
        padding-right: var(--page-pad);
        padding-left: var(--page-pad);
    }

    .fixed-header .info-marquee {
        animation-duration: 220s !important;
    }

    .fixed-header .blinking-text {
        font-size: clamp(1.45rem, 8vw, 2.25rem);
    }

    .table-responsive table {
        min-width: 560px;
    }

    .table-responsive th,
    .table-responsive td {
        font-size: clamp(0.72rem, 2.8vw, 0.92rem);
        padding: 0.38rem 0.42rem;
    }

    .fixed-bottom-nav {
        border-radius: 18px !important;
    }

    .fixed-bottom-nav .btn-label {
        font-size: 0.68rem;
    }
}

@media (max-width: 480px) {
    :root {
        --header-base-height: 88px;
        --bottom-nav-height: 68px;
    }

    .row {
        --bs-gutter-x: 0.75rem;
    }

    .card-body {
        padding: 0.92rem;
    }

    #blogs .card-img-top {
        width: calc(100% - 12px) !important;
        margin: 6px !important;
        border-width: 4px !important;
        border-radius: 12px !important;
    }

    .btn,
    .agent-action-btn,
    .owner-action-btn {
        width: 100%;
        justify-content: center;
    }

    .fixed-bottom-nav .nav-btn {
        padding-inline: 4px !important;
    }

    .floating-agent-whatsapp {
        right: calc(10px + var(--safe-right)) !important;
        bottom: calc(12px + var(--safe-bottom)) !important;
    }

    .language-switcher--floating {
        right: calc(10px + var(--safe-right)) !important;
        bottom: calc(72px + var(--safe-bottom)) !important;
    }
}

@media (max-width: 575.98px) {
    #blogs .row > [class*="col-"] {
        width: 100%;
    }
}

@media (max-width: 360px) {
    :root {
        --page-pad: 8px;
        --header-base-height: 84px;
        --bottom-nav-height: 64px;
    }

    .fixed-header .blinking-text {
        font-size: 1.38rem;
    }

    .fixed-bottom-nav .btn-label {
        display: none;
    }

    .fixed-bottom-nav .nav-btn i {
        margin-bottom: 0 !important;
    }

    .card-body {
        padding: 0.78rem;
    }
}

@media (orientation: landscape) and (max-height: 520px) {
    :root {
        --header-base-height: 72px;
        --bottom-nav-height: 58px;
    }

    .fixed-header .info-line {
        display: none;
    }

    .fixed-bottom-nav {
        padding-top: 4px !important;
        padding-bottom: 4px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
    }
}
