﻿/* Base */
@font-face {
  font-family: "PlusJakartaSans";
  src: url("../fonts/PlusJakartaSans-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Playfair Display";
  src: url("../fonts/PlayfairDisplay-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --body-bg: #f8f7fc;
  --html-bg: #edf2fa;
  --page-max-width: 10rem;
  --surface: #ffffff;
  --text: #212121;
  --subtle: #757575;
  --border: #e7e7e7;
  --accent: #6d48f2;
  --accent-soft: rgba(131, 88, 246, 0.08);
}

html {
  box-sizing: border-box;
  background-color: var(--html-bg);
}

body.page-body {
  margin: 0;
  color: var(--text);
  background-color: var(--body-bg);
  font-family: "PlusJakartaSans", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  max-width: var(--page-max-width);
  margin: 0 auto;
}

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

a,
button,
input {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

img {
  max-width: 100%;
}

.svg-icon {
  display: block;
  flex: 0 0 auto;
}

.is-hidden {
  display: none !important;
}

.page-shell {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background: var(--body-bg);
  display: flex;
  flex-direction: column;
}

.main-page {
  flex: 1;
}

.sheet-open {
  overflow: hidden;
}

/* Shared Layout */
.brand-link {
  display: inline-flex;
  align-items: center;
}

.brand-logo {
  display: block;
  width: 2.435897rem;
  height: 0.512821rem;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.512821rem;
  height: 0.512821rem;
  color: #212121;
}

.icon-button__icon {
  display: block;
  width: 0.512821rem;
  height: 0.512821rem;
}

.location-button {
  display: inline-flex;
  align-items: center;
  gap: 0.153846rem;
  color: #424242;
}

.location-button__icon {
  display: block;
  width: 0.410256rem;
  height: 0.461538rem;
}

.location-button__text,
.weather__text {
  color: #424242;
  font-size: 0.358974rem;
  line-height: 0.461538rem;
}

.location-button__arrow {
  display: block;
  width: 0.358974rem;
  height: 0.358974rem;
}

.header__meta-divider {
  flex: 0 0 auto;
  width: 0.025641rem;
  height: 0.282051rem;
  background: #b5b5b5;
}

.weather {
  display: flex;
  align-items: center;
  gap: 0.102564rem;
}

.weather__icon {
  display: block;
  width: 0.461538rem;
  height: 0.461538rem;
}

.event-favorite-button {
  display: inline-flex;
  align-items: center;
  gap: .1667rem;
  min-width: 1.2222rem;
  min-height: .564103rem;
  padding: .051282rem .153846rem;
  border-radius: 25.615385rem;
  background: rgba(255, 255, 255, 0.3);
  color: #ffffff;
  font-size: .307692rem;
  line-height: .384615rem;
  backdrop-filter: blur(.512821rem);
  -webkit-backdrop-filter: blur(.512821rem);
  transition:
    background-color .2s ease,
    color .2s ease,
    transform .2s ease;
}

.event-favorite-button.is-active {
  background: rgba(255, 255, 255, 0.88);
  color: #eb2c2c;
  /* transform: scale(1.03); */
  backdrop-filter: unset;
}

.event-favorite-button__icon {
  display: block;
  width: .410256rem;
  height: .358974rem;
}

.event-favorite-button__count {
  font-family: "PlusJakartaSans", Arial, sans-serif;
  font-size: .307692rem;
  line-height: .384615rem;
}

.event-card-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}

.page-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin: 1.3333rem 0;
}

.page-empty__title {
  margin: 0;
  color: #212121;
  font-family: "Playfair Display", Georgia, serif;
  font-size: .512821rem;
  font-weight: 800;
  line-height: .692308rem;
}

.page-empty__description {
  margin: 0;
  color: #757575;
  font-family: "PlusJakartaSans", Arial, sans-serif;
  font-size: .358974rem;
  line-height: .512821rem;
}

[dir="rtl"] .category-header__back-icon,
[dir="rtl"] .detail-header__back-icon,
[dir="rtl"] .lists-header__back-icon,
[dir="rtl"] .saved-header__back-icon,
[dir="rtl"] .search-header__back-icon,
[dir="rtl"] .tonight-header__back-icon {
  transform: rotate(180deg);
}

/* Language Switcher */
.language-control {
  position: relative;
  width: 100%;
}

.language-button,
.drawer__language-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.language-button {
  min-height: 0.820513rem;
  padding: 0.153846rem 0.358974rem;
  border: 0.025641rem solid rgba(255, 255, 255, 0.4);
  border-radius: 0.153846rem;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 0.358974rem;
  line-height: 0.512821rem;
}

.language-button__icon {
  display: block;
  width: 0.307692rem;
  height: 0.307692rem;
}

.drawer__language-button {
  min-height: 1.333333rem;
  padding: 0.307692rem 0.358974rem;
  border: 0.025641rem solid var(--border);
  border-radius: 0.410256rem;
  background: var(--surface);
  color: #424242;
  font-size: 0.410256rem;
  line-height: 0.512821rem;
}

.drawer__language-icon {
  display: block;
  width: 0.358974rem;
  height: 0.358974rem;
}

.language-menu {
  position: absolute;
  right: 0;
  left: 0;
  bottom: calc(100% + 0.205128rem);
  z-index: 3;
  box-sizing: border-box;
  padding: 0.205128rem;
  border: 0.025641rem solid var(--border);
  border-radius: 0.410256rem;
  background: var(--surface);
  box-shadow: 0 0.307692rem 0.923077rem rgba(19, 10, 46, 0.14);
  overflow: hidden;
}

.language-menu__list {
  height: 6.153846rem;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}

.language-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 1.025641rem;
  padding: 0 0.307692rem;
  border-radius: 0.25641rem;
  color: #424242;
  font-family: "PlusJakartaSans", Arial, sans-serif;
  font-size: 0.358974rem;
  line-height: 0.461538rem;
  background: transparent;
  text-align: left;
}

.language-option.is-active {
  background: #f8f7fc;
}

.language-option.is-active::after {
  content: "";
  width: 0.205128rem;
  height: 0.205128rem;
  border-radius: 25.615385rem;
  background: #6d48f2;
  flex: 0 0 auto;
}

/* Header */
.header-shell {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--body-bg);
}

.header {
  padding: 0.512821rem;
  background: var(--body-bg);
}

.header__brand-row,
.drawer__brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.307692rem;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 0.307692rem;
}

.header__meta-row,
.drawer__meta-row {
  display: flex;
  align-items: center;
}

.header__meta-row {
  gap: 0.307692rem;
  padding-top: 0.358974rem;
}

.drawer__meta-row {
  gap: 0.25641rem;
  padding-top: 0.358974rem;
}

/* Event Navigation */
.event-nav {
  position: relative;
  min-height: 1.487179rem;
  border-top: 0.025641rem solid rgba(0, 0, 0, 0.08);
  border-bottom: 0.025641rem solid rgba(0, 0, 0, 0.08);
  background: var(--body-bg);
}

.event-nav__viewport {
  overflow-x: auto;
  padding: 0.307692rem 0;
  scrollbar-width: none;
}

.event-nav__viewport::-webkit-scrollbar {
  display: none;
}

.event-nav__track {
  display: flex;
  align-items: center;
  gap: 0.205128rem;
  width: max-content;
  min-width: 100%;
  padding: 0 0.512821rem;
}

.pill-button,
.calendar-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 0.871795rem;
  flex: 0 0 auto;
  border-radius: 25.615385rem;
}

.pill-button {
  padding: 0.205128rem 0.307692rem;
  border: 0.025641rem solid transparent;
  background: var(--surface);
  color: var(--subtle);
  font-size: 0.358974rem;
  line-height: 0.461538rem;
  text-decoration: none;
  white-space: nowrap;
}

.pill-button.is-active {
  border-color: #212121;
  background: #212121;
  color: #ffffff;
  box-shadow: 0 0.205128rem 0.461538rem rgba(0, 0, 0, 0.2);
}

.calendar-button {
  width: 0.871795rem;
  min-width: 0.871795rem;
  background: var(--accent-soft);
}

.calendar-button__icon {
  display: block;
  width: 0.512821rem;
  height: 0.512821rem;
}

.scroll-button {
  position: absolute;
  top: 0;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.487179rem;
  height: 100%;
}

.scroll-button--left {
  left: 0;
  background: linear-gradient(270deg, rgba(248, 247, 252, 0) 0%, #f8f7fc 60%);
}

.scroll-button--right {
  right: 0;
  background: linear-gradient(90deg, rgba(248, 247, 252, 0) 0%, #f8f7fc 60%);
}

.scroll-button__icon {
  display: block;
  width: 0.717949rem;
  height: 0.512821rem;
}

.scroll-button__icon--left {
  transform: rotate(180deg);
}

/* Footer */
.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 0.820513rem;
  padding: 1.282051rem 1.153846rem 4.1667rem;
  background: #18023a;
  color: #ffffff;
  text-align: center;
}

.footer__logo {
  display: block;
  width: 4.410256rem;
  height: 0.769231rem;
}

.footer__content {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: center;
  gap: 0.410256rem;
  margin-top: 0.769231rem;
}

.footer__links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.358974rem;
  width: 100%;
  font-size: 0.307692rem;
  line-height: 0.512821rem;
}

.footer__links a + a,
.footer__links a + button,
.footer__links button + a,
.footer__links button + button {
  padding-inline-start: 0.358974rem;
  border-inline-start: 0.025641rem solid #757575;
}

.footer__links button {
  color: inherit;
}

.footer .language-control {
  width: 7.692308rem;
  max-width: 100%;
}

.footer .language-button {
  min-height: 0.820513rem;
  padding: 0.153846rem 0.358974rem;
  border: 0.012821rem solid rgba(255, 255, 255, 0.4);
  border-radius: 0.153846rem;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-family: "PlusJakartaSans", Arial, sans-serif;
  font-size: 0.358974rem;
  line-height: 0.512821rem;
}

.footer .language-button__icon {
  width: 0.307692rem;
  height: 0.307692rem;
  color: #ffffff;
  flex: 0 0 auto;
}

.footer .language-menu {
  padding: 0.205128rem;
  border: 0.012821rem solid rgba(255, 255, 255, 0.24);
  border-radius: 0.205128rem;
  background: #18023a;
  box-shadow: 0 0.307692rem 0.615385rem rgba(7, 2, 22, 0.3);
}

.footer .language-option {
  min-height: 1.025641rem;
  padding: 0 0.25641rem;
  border-radius: 0.153846rem;
  color: #ffffff;
  font-family: "PlusJakartaSans", Arial, sans-serif;
  font-size: 0.358974rem;
  line-height: 0.512821rem;
}

.footer .language-option.is-active {
  background: rgba(255, 255, 255, 0.1);
}

.footer .language-option.is-active::after {
  content: "";
  width: 0.205128rem;
  height: 0.205128rem;
  border-radius: 25.615385rem;
  background: #6d48f2;
  flex: 0 0 auto;
}

.footer__copyright {
  margin: 1.025641rem 0 0;
  font-size: 0.307692rem;
  line-height: 0.384615rem;
}

/* Back Top */
.back-top-shell {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 10;
  width: 100%;
  max-width: var(--page-max-width);
  height: 0;
  transform: translateX(-50%);
  pointer-events: none;
}

.back-top {
  position: absolute;
  right: 0.769231rem;
  bottom: 4.102564rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.769231rem;
  height: 0.769231rem;
  border-radius: 25.615385rem;
  background: rgba(176, 183, 201, 0.6);
  box-shadow: 0 0.051282rem 0.205128rem rgba(0, 0, 0, 0.12);
  color: #ffffff;
  opacity: 0;
  transform: scale(0);
  transform-origin: center;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease,
    background-color 0.2s ease;
  pointer-events: none;
  backdrop-filter: blur(0.102564rem);
  -webkit-backdrop-filter: blur(0.102564rem);
}

.back-top.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.back-top__icon {
  width: 0.358974rem;
  height: 0.358974rem;
}

/* Toast */
.toast-layer {
  position: fixed;
  left: 50%;
  top: 1.025641rem;
  z-index: 70;
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: var(--page-max-width);
  padding: 0 0.512821rem;
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  min-width: 2.871795rem;
  max-width: 100%;
  padding: 0.25641rem 0.410256rem;
  border-radius: 0.358974rem;
  background: rgba(33, 33, 33, 0.92);
  box-shadow: 0 0.153846rem 0.410256rem rgba(0, 0, 0, 0.16);
  color: #ffffff;
  font-family: "PlusJakartaSans", Arial, sans-serif;
  font-size: 0.333333rem;
  font-weight: 500;
  line-height: 0.435897rem;
  text-align: center;
  opacity: 0;
  transform: translateY(-0.205128rem);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

.toast.is-active {
  opacity: 1;
  transform: translateY(0);
}

.ad-slot {
  display: flex;
  justify-content: center;
  width: 100%;
}

.ad-slot--closable {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.ad-slot--closable > div[id] {
    margin-left: auto;
    margin-right: auto;
}

.ad-slot__close {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  margin: 0;
}

.ad-slot--closable:not(.ad-slot--float) .ad-slot__close {
  position: relative;
  width: 100%;
  justify-content: flex-start;
  align-items: flex-start;
  min-height: 25px;
  z-index: 1;
}

.ad-slot--closable:not(.ad-slot--float) .ad-slot__close::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  border-bottom: .1111rem solid #e7e7e7;
}

.ad-slot__close-icon {
  display: block;
  width: 37px;
  height: 21px;
  transform: rotate(180deg);
  pointer-events: none;
}

.ad-slot--pending-gesture {
  display: none !important;
}

.ad-slot:has(div[style*="display: none;"]):not(
    :has(div[data-type="_mgwidget"])
  ) {
  display: none;
  margin: 0 !important;
}

.float-ad {
  position: fixed;
  bottom: 0;
  width: 10rem;
  background-color: white;
  z-index: 20;
}

.float-ad .ad-slot--closable {
    position: static;
}

.float-ad .ad-slot__close {
  position: absolute;
  top: -21px;
  left: 0;
  z-index: 2;
  margin: 0;
}
