/*!
 * TikketFy Marketplace city widget styles
 * https://tikketfymarketplace.com/widget/
 *
 * Two parts:
 *  1. .tikketfy-btn  optional ready-made button for the affiliate's own page
 *  2. .tkf-*         the city popup (city.js loads this file inside its own
 *                    Shadow DOM, so these rules never touch the host page)
 */

/* 1. Optional trigger button ------------------------------------------- */
.tikketfy-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border: 0; border-radius: 999px; cursor: pointer;
  background: #e50f64; color: #fff; text-decoration: none; white-space: nowrap;
  font: 600 16px/1.2 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  transition: background-color .2s ease, transform .12s ease-out;
}
/* Partner sites style their links (e.g. ".entry-content a { color: ... }"), which
   would recolor a link-based button. Lock the text color and underline. */
.tikketfy-btn, .tikketfy-btn:link, .tikketfy-btn:visited, .tikketfy-btn:hover, .tikketfy-btn:focus, .tikketfy-btn:active {
  color: #fff !important; text-decoration: none !important;
}
.tikketfy-btn:hover { background: #c40a54; }
.tikketfy-btn:active { transform: scale(.97); }
.tikketfy-btn:focus-visible { outline: 3px solid #ffc607; outline-offset: 2px; }

/* 2. Popup (inside the widget's Shadow DOM) ----------------------------- */
:host { all: initial; }
.tkf-overlay {
  position: fixed; inset: 0; display: grid; place-items: center; padding: 16px;
  background: rgb(7 2 58 / .6); opacity: 0; transition: opacity .25s ease;
  font: 400 16px/1.5 "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #404e5b; -webkit-font-smoothing: antialiased; box-sizing: border-box;
}
.tkf-overlay[hidden] { display: none; }
.tkf-overlay.tkf-open { opacity: 1; }
.tkf-overlay *, .tkf-overlay *::before, .tkf-overlay *::after { box-sizing: border-box; }

.tkf-panel {
  width: min(880px, 100%); max-height: calc(100dvh - 32px); overflow: auto; overscroll-behavior: contain;
  background: #fff; border-radius: 20px; box-shadow: 0 40px 80px -30px rgb(7 2 58 / .6);
  transform: translateY(16px) scale(.98); transition: transform .35s cubic-bezier(.16, 1, .3, 1);
}
.tkf-open .tkf-panel { transform: none; }

.tkf-head {
  position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  padding: 24px 24px 18px; background: #fff; border-bottom: 1px solid #e5e3ee;
}
.tkf-head h2 { margin: 0; color: #0d0a2c; font-size: 30px; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
.tkf-head p { margin: 6px 0 0; color: #5d6874; font-size: 15px; }
.tkf-close {
  flex: none; width: 44px; height: 44px; display: grid; place-items: center; padding: 0; cursor: pointer;
  border: 1.5px solid #e5e3ee; border-radius: 999px; background: #fff; color: #0d0a2c;
  transition: border-color .2s, transform .12s ease-out;
}
.tkf-close:hover { border-color: #0d0a2c; }
.tkf-close:active { transform: scale(.94); }
.tkf-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.tkf-close:focus-visible, .tkf-city:focus-visible, .tkf-foot a:focus-visible { outline: 3px solid #e50f64; outline-offset: 2px; }

/* 10 cities = 2 rows of 5 on desktop, 5 rows of 2 on phones */
.tkf-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; padding: 20px 24px 8px; }
.tkf-city {
  position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: flex-end;
  aspect-ratio: 4 / 3; padding: 14px; border-radius: 16px; background: #07023a; color: #fff; text-decoration: none;
  transition: transform .12s ease-out;
}
.tkf-city img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .6s cubic-bezier(.16, 1, .3, 1); }
.tkf-city::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgb(7 2 58 / .88), rgb(7 2 58 / .1) 65%); }
.tkf-city:hover img { transform: scale(1.06); }
.tkf-city:active { transform: scale(.98); }
.tkf-name { font-size: 18px; font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }
.tkf-name small { display: block; font-size: 13px; font-weight: 500; opacity: .8; }
.tkf-arrow {
  position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: 999px; background: rgb(255 255 255 / .2); transition: background-color .25s, transform .3s cubic-bezier(.16, 1, .3, 1);
}
.tkf-arrow svg { width: 16px; height: 16px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.tkf-city:hover .tkf-arrow { background: #e50f64; transform: rotate(45deg); }

.tkf-foot { padding: 10px 24px 18px; font-size: 13px; color: #5d6874; text-align: right; }
.tkf-foot a { color: #d00d5b; font-weight: 600; text-decoration: none; }
.tkf-foot a:hover { text-decoration: underline; }

@media (max-width: 760px) {
  .tkf-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .tkf-overlay { padding: 10px; }
  .tkf-panel { max-height: calc(100dvh - 20px); border-radius: 16px; }
  .tkf-head { padding: 18px 16px 14px; }
  .tkf-head h2 { font-size: 24px; }
  .tkf-grid { gap: 10px; padding: 14px 16px 6px; }
  .tkf-city { padding: 12px; }
  .tkf-name { font-size: 16px; }
  .tkf-arrow { width: 28px; height: 28px; }
  .tkf-foot { padding: 8px 16px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .tkf-overlay, .tkf-panel, .tkf-city img, .tkf-arrow { transition: none; }
}
