/* normad-beta-exclusive component classes, split out of app/globals.css so they
   don't ship (or read as "mixed in") for the other 4 variations. Loaded via
   <link> only when APPLICATION_SITE_VARIATION=normad-beta, same mechanism as
   the per-variation theme CSS in public/themes/<variation>/. See
   scripts/copy-themes.mjs and core/layout/getServerLayoutData.ts. */

/* ======================================================================================
   What is left in this file, and why it can't be Tailwind classes on the element:
   1. CMS content - admin HTML rendered with dangerouslySetInnerHTML (info center, about us,
      promotion detail): we can't put classes on those elements.
   2. @keyframes.
   3. Hooks for shared components (components/, app/) that normad-beta renders but doesn't own,
      and rules on shared layout elements. These go when normad-alpha is cleaned up too.
   Everything else is Tailwind classes in the normad-beta components.
   ====================================================================================== */

/* ======================== 1. CMS content ======================== */
/* CHM reset.css: a { transition: all .3s ease } - the smooth hover on these pages */
.info-center-container a {
    transition: all .3s ease;
}

/* Per-type brand colors (CHM Content/social-media.css - fixed brand colors, not theme-driven) */
.contact-us-mobile-list a[data-type="facebook-messenger" i] i { background: #0084FF; }
.contact-us-mobile-list a[data-type="email" i] i { background: #EA4335; }
.contact-us-mobile-list a[data-type="line" i] i { background: #00C300; }
.contact-us-mobile-list a[data-type="message" i] i { background: #34C759; }
.contact-us-mobile-list a[data-type="phone" i] i { background: #25D366; }
.contact-us-mobile-list a[data-type="microsoft-teams" i] i { background: #6264A7; }
.contact-us-mobile-list a[data-type="skype" i] i { background: #6264A7; }
.contact-us-mobile-list a[data-type="telegram" i] i { background: #229ED9; }
.contact-us-mobile-list a[data-type="wechat" i] i { background: #07C160; }
.contact-us-mobile-list a[data-type="whatsapp" i] i { background: #25D366; }
.contact-us-mobile-list a[data-type="facebook" i] i { background: #1877F2; }
.contact-us-mobile-list a[data-type="instagram" i] i { background: #E4405F; }
.contact-us-mobile-list a[data-type="twitter" i] i { background: #1DA1F2; }
.contact-us-mobile-list a[data-type="url" i] i { background: #007AFF; }
.contact-us-mobile-list a[data-type="default" i] i { background: #007AFF; }


/* Info Center - CMS content, CHM NormadBeta InfoCenter/desktop-content.css +
   mobile-content.css. data-platform picks the mobile values, as CHM loads a
   different stylesheet per platform rather than switching on viewport width. */
.info-center-container {
    text-align: justify;
    color: var(--secondary-color-12);
    font-size: 14px;
    line-height: 1.5;
}

/* ---- Info Center / About Us CMS content (pages/{desktop,mobile}/info) ----
   CHM NormadBeta InfoCenter/desktop-content.css + mobile-content.css. data-platform picks the
   mobile values, as CHM loads a different stylesheet per platform rather than switching on
   viewport width. The container's own text styles are Tailwind classes in the pages. */
.info-center-container h2 {
    color: var(--primary-color-20);
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: underline;
    margin: 0 0 30px;
    text-align: initial;
}

.info-center-container h3 {
    font-weight: 700;
    font-size: 24px;
    line-height: 1.2;
    padding-left: 15px;
    border-left: 4px solid var(--primary-color-20);
    margin: 0 0 8px;
}

.info-center-container h4 {
    font-size: 18px;
    font-weight: 500;
    line-height: 1.2;
    margin: 0 0 8px;
}

.info-center-container h5 {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 8px;
}

.info-center-container p {
    line-height: 26px;
    margin: 0 0 25px;
}

.info-center-container ol,
.info-center-container ul {
    margin-left: 40px;
    line-height: 26px;
}

.info-center-container ol {
    list-style: decimal;
}

.info-center-container ul {
    list-style: disc;
}

/* CHM reset.css: a { transition: all .3s ease } - the smooth hover on these pages */
.info-center-container a {
    color: var(--primary-color-18);
    transition: all .3s ease;
}

.info-center-container a:hover {
    color: var(--primary-color-20);
}

@media (hover: hover) {
    .info-center-container .panel-heading a:hover {
        color: var(--primary-color-20);
    }
}

/* Bootstrap grid wrappers the CMS markup carries (.row > .col-md-12) */
.info-center-container .row {
    margin: 0 -12px;
}

.info-center-container .row > * {
    padding: 0 12px;
}

/* Bootstrap 3 accordion (.panel-group/.panel/.panel-collapse) - toggled by useLegacyCollapse */
.info-center-container .panel {
    border-radius: 4px;
}

.info-center-container .panel + .panel {
    margin-top: 5px;
}

.info-center-container .panel-heading {
    background-color: var(--secondary-color-4);
    padding: 10px 15px;
    border-radius: 3px 3px 0 0;
}

.info-center-container .panel-heading a {
    color: var(--primary-color-18);
}

/* max-height is animated by useLegacyCollapse. visibility: the markup's literal
   "collapse" class also matches Tailwind's .collapse (visibility: collapse) utility. */
.info-center-container .panel-collapse {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    visibility: visible;
}

.info-center-container .panel-body {
    padding: 15px;
    background-color: var(--secondary-color-9);
    color: var(--secondary-color-13);
}

.info-center-container[data-platform="mobile"] h2 {
    font-size: 28px;
}

.info-center-container[data-platform="mobile"] h3 {
    font-size: 20px;
}

.info-center-container[data-platform="mobile"] h5 {
    font-size: 16px;
}

.info-center-container[data-platform="mobile"] .row > * {
    padding: 0 16px;
}

.info-center-container[data-platform="mobile"] .panel-collapse ol {
    background-color: var(--secondary-color-9);
    color: var(--secondary-color-13);
}

.info-center-container[data-platform="mobile"] .panel-collapse ol {
    padding-left: 40px;
    margin: 0;
}

/* About Us - CHM NormadBeta InfoCenter/{desktop,mobile}-content.css .about-us-container.
   Title/game-panel colors are the same in every CHM theme; only .inner-box varies.
   The fallback/CMS markup carries Bootstrap 3's .row > .col-sm-6 (floated halves). */
.info-center-container .row {
    display: flow-root;
}

@media (min-width: 768px) {
    .info-center-container .col-sm-6 {
        float: left;
        width: 50%;
    }
}

.about-us-container h5[data-title="safe-and-secure-gaming-environment"] {
    color: #00b4bf;
}

.about-us-container h5[data-title="customer-experience"] {
    color: #00bf99;
}

.about-us-container h5[data-title="fast-and-secure-payments"] {
    color: #9e5bff;
}

.about-us-container h5[data-title="sky-is-not-the-limit"] {
    color: #ff1688;
}

.about-us-container .inner-box {
    background-color: var(--secondary-color-9);
    border: 1px solid var(--primary-color-12);
    border-radius: 5px;
    padding: 40px 16px 10px 16px;
    min-height: 250px;
    text-align: center;
    margin-top: 50px;
    margin-bottom: 20px;
}

.about-us-container .inner-box > img,
.about-us-container .inner-box > picture > img {
    margin-top: -100px;
}

.about-us-container .game-panel {
    display: flex;
    justify-content: space-between;
    margin: 0 0 30px 0;
    list-style: none;
}

.about-us-container .game-panel li {
    flex-basis: calc((100% - 10px * 5) / 6);
    text-align: center;
    position: relative;
}

.about-us-container .game-panel li > img,
.about-us-container .game-panel li > picture > img {
    width: 100%;
}

.about-us-container .game-panel li > p {
    font-weight: 700;
    color: var(--secondary-color-15);
    margin: 0;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 10px;
    text-align: center;
}

.about-us-container[data-platform="mobile"] .inner-box {
    margin-top: 70px;
    margin-bottom: 0;
}

.about-us-container[data-platform="mobile"] .game-panel {
    flex-wrap: wrap;
}

.about-us-container[data-platform="mobile"] .game-panel li {
    flex-basis: calc((100% - 10px * 2) / 3);
    margin-bottom: 10px;
}

/* ---- Promotion detail CMS content (admin promo HTML, dangerouslySetInnerHTML) ----
   CHM Content/NormadBeta/Promotions/{desktop,mobile}-content.css. */

/* desktop */
/* Admin-authored promo HTML (dangerouslySetInnerHTML) can include plain <table> markup with no
   inline styling - CHM's own table border rule (Content/NormadBeta/Promotions/desktop-content.css
   ".promotion-item table td, .promotion-item-details table td { border: 1px solid; }") doesn't
   even match this exact modal's ancestor class in CHM's own checked-out source (it's plain
   .modal-body there), yet the live site still renders a border - same declaration here, scoped
   to this component's own marker class instead of chasing an ancestor class CHM's view doesn't
   have either. No color specified, same as CHM, so it inherits the content's text color via currentColor. */
.promo-detail-content table td {
    border: 1px solid;
}

/* mobile - CHM .promotion-content (padding/lists/table borders) + the Bootstrap 5
   reboot/reset.css heading & paragraph defaults its markup relies on */
.promo-detail-content-mobile h1,
.promo-detail-content-mobile h2,
.promo-detail-content-mobile h3,
.promo-detail-content-mobile h4,
.promo-detail-content-mobile h5,
.promo-detail-content-mobile h6 {
    margin: 0 0 .5rem;
    font-weight: 500;
    line-height: 1.2;
}

.promo-detail-content-mobile h1 { font-size: calc(1.375rem + 1.5vw); }
.promo-detail-content-mobile h2 { font-size: calc(1.325rem + .9vw); }
.promo-detail-content-mobile h3 { font-size: calc(1.3rem + .6vw); }
.promo-detail-content-mobile h4 { font-size: 18px; }
.promo-detail-content-mobile h5 { font-size: 1.25rem; }
.promo-detail-content-mobile h6 { font-size: 1rem; }

.promo-detail-content-mobile p {
    margin: 0 0 1rem;
}

.promo-detail-content-mobile ul,
.promo-detail-content-mobile ol {
    margin: 10px 0 10px 30px;
}

.promo-detail-content-mobile ul {
    list-style: disc;
}

.promo-detail-content-mobile ol {
    list-style: decimal;
}

.promo-detail-content-mobile table td {
    border: 1px solid;
}

/* ======================== 2. @keyframes (Tailwind animate-[name_...] classes in the components) ======================== */

@keyframes float10 {
    0% { transform: translateY(0); }
    100% { transform: translateY(-10px); }
}

@keyframes float50 {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50px); }
}

@keyframes animate-rtp {
    0% {
        width: var(--from-value);
        background: var(--from-color);
    }

    25% {
        background: var(--transition-color);
    }

    50%, 100% {
        width: var(--to-value);
        background: var(--to-color);
    }
}

@keyframes fadeInLeft {
    0% { opacity: 0; transform: translate3d(-100%, 0, 0); }
    to { opacity: 1; transform: none; }
}

@keyframes fadeInRight {
    0% { opacity: 0; transform: translate3d(100%, 0, 0); }
    to { opacity: 1; transform: none; }
}

@keyframes float20 {
    0% { transform: translateY(0); }
    100% { transform: translateY(-20px); }
}

@keyframes float100 {
    0% { transform: translateY(0); }
    100% { transform: translateY(-100px); }
}

@keyframes footer-pulse {
    0% { filter: initial; }
    50% { filter: brightness(40.5) drop-shadow(0 0 10px white); }
}

/* ======================== 3. Shared components / shared layout ======================== */

/* ---- Shared form inputs (components/form/*, components/login/forgotPasswordModalContent.tsx) ---- */

.form-control {
    color: var(--standard-form-input-text-color, var(--color-secondary-1));
    background: var(--standard-form-input-bg, var(--color-secondary-9));
    border: 1px solid var(--standard-form-input-border-color, var(--color-secondary-6));
}

/* ---- Shared register modal (components/register/registerModalContent.tsx) ----
   CHM's .standard-form-title:first-of-type has margin-top:0 (mobile-standard.css) - the shared
   register-form-container's fixed gap before the first section header doesn't account for that,
   leaving a large empty gap above "Personal Information". Also left-align the section header
   text instead of the shared component's mobile default of centered. */
.register-form-container {
    --register-title-gap: 0px;
    --register-section-header-align: left;
}

/* ---- Mobile side menu (Sidebar.tsx): CHM slides .inner-body 60% left while the menu is open.
   <main> lives in the shared mobile layout, so Sidebar flags <html data-site-menu-open> and it is
   shifted from here (FooterBar shifts itself). */
main {
    transition: transform .1s;
}

html[data-site-menu-open] main {
    transform: translateX(-60%);
}

/* Shared .btn-register users rendered on normad-beta (components/login/enterOtpCodeScreen,
   components/register/errorRegisterModal): Button Primary gradient. Kept in the components
   layer like the app/globals.css rule it overrides, so those components' own Tailwind
   utilities (text colour, disabled bg) still win and its :disabled rule still applies. */
@layer components {
    .btn-register {
        background-image: linear-gradient(to bottom, var(--primary-color-3), var(--primary-color-4));
        color: var(--secondary-color-16);
    }

    .btn-register:hover:not(:disabled) {
        background-image: linear-gradient(to bottom, var(--primary-color-4), var(--primary-color-3));
    }
}

/* CHM .popup-modal hooks on the shared components/ApkInstallationGuideModal (and
   MobilePromotionShareModal's header). Colours follow the Figma login pop-up: Button Primary
   gradient header, BG pop up body, default text. */
.popup-modal {
    box-shadow: 0 3px 9px 0 rgb(0 0 0 / 0.5);
}

.popup-modal-header {
    background-image: linear-gradient(to right, var(--primary-color-3), var(--primary-color-4));
}

.popup-modal-body {
    background-color: var(--secondary-color-9);
    color: var(--secondary-color-12);
}

/* APK install guide (shared components/ApkInstallationGuideModal) - CHM #apk_install_guide_modal
   (.modal.download-popup-modal). Mobile vs desktop is picked by the page (the component's
   platform prop -> .apk-guide-modal--mobile), not by viewport width, so the mobile page keeps
   its centred layout even in a wide browser. */
.apk-guide-modal-title {
    color: var(--secondary-color-15);
}

.apk-guide-modal-header button path {
    stroke-width: 3;
}

.apk-guide-modal-platform {
    color: inherit;
}

/* grey Android logo, like CHM's filter: contrast(0) on the white icons/android-logo.svg */
.apk-guide-modal-platform svg {
    filter: contrast(0);
}

.apk-guide-modal-steps {
    list-style-position: outside;
    padding-left: 40px;
}

/* Desktop page: left-aligned, link colour, a bit wider than the shared max-w-xl */
.apk-guide-modal:not(.apk-guide-modal--mobile) {
    max-width: 660px;
}

.apk-guide-modal:not(.apk-guide-modal--mobile) .apk-guide-modal-header {
    padding: 16px 22px;
}

.apk-guide-modal:not(.apk-guide-modal--mobile) .apk-guide-modal-title {
    font-size: 17px;
}

.apk-guide-modal:not(.apk-guide-modal--mobile) .apk-guide-modal-body {
    padding: 20px 28px 24px;
    font-size: 15px;
    line-height: 1.5;
}

.apk-guide-modal:not(.apk-guide-modal--mobile) .apk-guide-modal-failed {
    padding-left: 40px;
}

.apk-guide-modal:not(.apk-guide-modal--mobile) .apk-guide-modal-failed a {
    color: var(--primary-color-18);
}

/* Mobile page: bold title, everything centred */
.apk-guide-modal--mobile .apk-guide-modal-header {
    padding: 10px 20px;
}

.apk-guide-modal--mobile .apk-guide-modal-title {
    font-weight: 700;
}

.apk-guide-modal--mobile .apk-guide-modal-body {
    text-align: center;
}

.apk-guide-modal--mobile .apk-guide-modal-platform {
    justify-content: center;
}

.apk-guide-modal--mobile .apk-guide-modal-failed {
    padding-left: 0;
}

/* Desktop topbar APK icon (components/Header.tsx). Unlike the other topbar icons it has no
   per-theme CDN copy - it's the shared white icons/android-logo.svg - so light themes tint it
   via --topbar-apk-icon-filter to match their grey layout/*.svg icons. */
.topbar-apk-icon {
    filter: var(--topbar-apk-icon-filter, none);
}

.welcome-popup-footer {
    border-color: var(--welcome-popup-footer-border, var(--secondary-color-4));
}

/* Hot Games provider list label (mobile) - CHM mobile-game-list.css .game-list ul > li > span */
.provider-list-text {
    color: var(--provider-list-text-color, var(--secondary-color-12));
}

/* Home category tab bar (GameSection.tsx) - CHM _NormadBetaMobileMainMenu.cshtml
   .main-menu-outer-container > main > a[data-active="true"]. */
.menu-tab-btn[data-active="true"] {
    color: var(--main-menu-outer-container-link-active-color, var(--primary-color-20));
}

/* Provider list "i" info badge (desktop LargeGameListPage.tsx) - CHM
   --large-game-list-li-a-game-info-color(-hover-focus-color). Falls back to the previous
   primary-20/secondary-17 pair for themes that don't define it yet. */
.large-game-list-info-badge {
    border-color: var(--large-game-list-info-color, var(--primary-color-20));
    color: var(--large-game-list-info-color, var(--primary-color-20));
}

.large-game-list-info-badge:hover,
.large-game-list-info-badge:focus {
    border-color: var(--large-game-list-info-hover-color, var(--secondary-color-17));
    color: var(--large-game-list-info-hover-color, var(--secondary-color-17));
}

/* Mobile header vertical separator (before the site-menu trigger) - CHM dark groove by default,
   light themes override with a flat stroke colour */
.mobile-header-separator {
    background-color: var(--mobile-header-separator-bg, var(--secondary-color-1));
    box-shadow: var(--mobile-header-separator-shadow, 2px 0 4px color-mix(in srgb, var(--secondary-color-16) 35%, transparent));
}
