*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

::selection {
  background: rgba(206, 171, 93, 0.3);
  color: var(--white);
}

:root {
  --primary: rgb(227, 6, 19);
  --primary-hover: rgb(138, 16, 2);
  --accent: rgb(206, 171, 93);
  --bg: rgb(0, 64, 112);
  --bg-dark: rgb(26, 43, 76);
  --white: #FFFFFF;
  --card-bg: rgba(255, 255, 255, 0.06);
  --card-border: rgba(255, 255, 255, 0.10);
  --card-hover-border: color-mix(in srgb, var(--accent) 35%, transparent);
  --text-muted: rgba(255, 255, 255, 0.55);
  --text-secondary: rgba(255, 255, 255, 0.75);
  --sold-out-bg: rgba(255, 255, 255, 0.03);
  --sold-out-border: rgba(255, 255, 255, 0.05);
  --font-family: Arial, sans-serif;
}

body {
  font-family: var(--font-family);
  background: linear-gradient(165deg, var(--bg-dark) 0%, var(--bg) 100%);
  color: var(--white);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Widget Container ---------- */

.widget {
  max-width: 400px;
  margin: 0 auto;
  padding: 28px 20px 20px;
}

/* ---------- Header ---------- */

.widget-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.widget-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.35;
  text-transform: uppercase;
}

.widget-title span {
  color: var(--accent);
}

/* ---------- Language Toggle ---------- */

.lang-toggle {
  display: flex;
  border: 1px solid var(--card-border);
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  margin-left: 16px;
  margin-top: 2px;
}

.lang-toggle button {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.03em;
}

.lang-toggle button.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

.lang-toggle button:hover:not(.active) {
  color: var(--text-secondary);
}

/* ---------- Ticket Cards ---------- */

.tickets {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.ticket-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 16px;
  transition: all 0.25s ease;
  cursor: default;
}

.ticket-card:not(.sold-out):hover {
  border-color: var(--card-hover-border);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.ticket-card.sold-out {
  background: var(--sold-out-bg);
  border-color: var(--sold-out-border);
  opacity: 0.5;
}

.ticket-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 4px;
}

.ticket-name {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}

.ticket-price-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-left: 12px;
  flex-shrink: 0;
}

.ticket-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
  margin-left: 12px;
}

.ticket-price-wrap .ticket-price {
  margin-left: 0;
}

.ticket-subtotal {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  opacity: 0.7;
  margin-top: 2px;
}

.ticket-subtotal:empty {
  display: none;
}

.sold-out-label {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ticket-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
}

.sold-out .ticket-desc,
.ticket-desc:last-child {
  margin-bottom: 0;
}

/* ---------- GA Register Button (inline) ---------- */

.ticket-ga-action {
  margin-top: 12px;
}

.ga-register-btn {
  display: block;
  padding: 10px;
  border-radius: 10px;
  background: var(--primary);
  color: var(--white);
  text-align: center;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: all 0.2s;
}

.ga-register-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--primary-hover);
}

.ga-register-btn:active {
  transform: translateY(0);
}

/* ---------- Quantity Selector ---------- */

.qty-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.qty-btn {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid var(--card-border);
  background: transparent;
  color: var(--white);
  font-size: 16px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  user-select: none;
}

.qty-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.qty-btn:active {
  transform: scale(0.92);
}

.qty-value {
  width: 36px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: all 0.15s;
}

.qty-value.has-value {
  color: var(--accent);
}

/* ---------- Register Button (main) ---------- */

.register-btn {
  display: block;
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  text-align: center;
}

.register-btn:hover:not(.disabled) {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--primary-hover);
}

.register-btn:active:not(.disabled) {
  transform: translateY(0);
}

.register-btn.disabled {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  cursor: not-allowed;
  pointer-events: none;
}

/* ---------- Footer ---------- */

.powered-by {
  text-align: center;
  margin-top: 16px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.25);
  letter-spacing: 0.04em;
}

.powered-by a {
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
}

.powered-by a:hover {
  color: rgba(255, 255, 255, 0.6);
}

/* ---------- Loading ---------- */

.ticket-loading {
  display: flex;
  justify-content: center;
  padding: 40px 0;
}

.loading-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ---------- Responsive ---------- */

@media (max-width: 440px) {
  .widget {
    padding: 20px 16px 16px;
  }

  .widget-title {
    font-size: 15px;
  }

  .ticket-card {
    padding: 14px;
  }
}
