/* Container */
.wpst-event { max-width: 820px; margin: 2rem auto; padding: 1.5rem; background:#fff; border-radius: 12px; box-shadow:0 6px 24px rgba(0,0,0,.06); }
.wpst-event h2 { margin:0 0 .5rem; font-size: 2rem; letter-spacing:.2px; }
.wpst-event .wpst-sub { color:#6b7280; margin:.25rem 0 1rem; }

/* Meta */
.wpst-meta { display:grid; grid-template-columns: 1fr; gap:.25rem; margin:.5rem 0 1.25rem; }
.wpst-meta strong { color:#111827; }
.wpst-note { color:#6b7280; }

/* Status chips */
.wpst-chip { display:inline-block; padding:.3rem .6rem; border-radius:999px; border:1px solid transparent; font-size:.85rem; }
.wpst-chip--open   { background:#dcfce7; border-color:#86efac; color:#065f46; }
.wpst-chip--closed { background:#fee2e2; border-color:#fca5a5; color:#7f1d1d; }
.wpst-chip--soon   { background:#fef3c7; border-color:#fcd34d; color:#92400e; }

/* Ticket section */
.wpst-tickets { margin-top: 1.5rem; }
.wpst-tickets h3 { margin:0 0 .75rem; font-size:1.25rem; }
.wpst-table { width:100%; border-collapse:collapse; background:#fff; border-radius:10px; overflow:hidden; }
.wpst-table th, .wpst-table td { padding:.9rem .8rem; border-bottom:1px solid #e5e7eb; text-align:left; }
.wpst-table th { background:#f9fafb; font-weight:600; color:#374151; }
.wpst-price { white-space:nowrap; }
.wpst-qty { width:72px; }

/* Buttons */
.wpst-btn { display:inline-flex; align-items:center; gap:.5rem; border-radius:8px; padding:.55rem .9rem; font-weight:600; cursor:pointer; border:1px solid transparent; background:#0ea5e9; color:#fff; }
.wpst-btn:hover { background:#0284c7; }
.wpst-btn:disabled { opacity:.6; cursor:not-allowed; }

/* Message */
.wpst-msg { margin-top:.75rem; color:#b91c1c; }

/* Improve layout and alignment for the action cells */
.wpst-table td:nth-child(3),
.wpst-table td:nth-child(4) {
  white-space: nowrap;
  text-align: right;
}

/* Quantity input */
.wpst-qty {
  width: 80px;
  padding: .45rem .5rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: .95rem;
  background: #fff;
}
.wpst-qty:focus {
  outline: none;
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14,165,233,.2);
}
/* Hide spinners (WebKit) */
.wpst-qty::-webkit-outer-spin-button,
.wpst-qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
/* Hide spinners (Firefox) */
.wpst-qty[type=number] { -moz-appearance: textfield; }

/* Primary Buy button */
.wpst-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  border-radius: 10px;
  padding: .6rem 1rem;
  font-weight: 700;
  border: 1px solid transparent;
  background: #0ea5e9;
  color: #fff;
  transition: background .15s ease, transform .02s ease;
}
.wpst-btn:hover { background:#0284c7; }
.wpst-btn:active { transform: translateY(1px); }
.wpst-btn:disabled { opacity:.6; cursor:not-allowed; }

.wpst-event-imgwrap { margin: 0 0 1rem; }
.wpst-event-img { width: 100%; height: auto; border-radius: 10px; display:block; }

.wpst-event { background:#fff; border:1px solid #e5e7eb; border-radius:14px; padding:18px 20px; box-shadow:0 8px 24px rgba(0,0,0,.06); }
.wpst-event .regular-text { width:100%; max-width:420px; }
.wpst-event textarea { width:100%; max-width:520px; }
.wpst-btn { display:inline-block; padding:.55rem .9rem; border-radius:.65rem; background:#111827; color:#fff; text-decoration:none; border:0; cursor:pointer; }
.wpst-btn:hover { filter:brightness(1.1); }
.wpst-note { color:#6b7280; font-size:.9rem; }
.wpst-qr { margin:1rem 0; }

/* --- WP Simple Tickets: purchase widget hardening --- */

.wpst-purchase,
.wpst-purchase * { box-sizing: border-box; }

/* Neutralize theme grids/floats inside the widget */
.wpst-purchase .row,
.wpst-purchase .columns,
.wpst-purchase .wpst-row,
.wpst-purchase .form-row {
  display: block !important;
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Stack every control full width */
.wpst-purchase input[type="text"],
.wpst-purchase input[type="email"],
.wpst-purchase input[type="number"],
.wpst-purchase input[type="tel"],
.wpst-purchase select,
.wpst-purchase textarea {
  width: 100% !important;
  max-width: 100% !important;
  display: block !important;
}

/* Space between fields */
.wpst-purchase .wpst-field,
.wpst-purchase .wpst-group,
.wpst-purchase p,
.wpst-purchase .form-row { margin: 0 0 12px 0 !important; }

/* Actions (Buy button) */
.wpst-purchase .wpst-actions,
.wpst-purchase .submit,
.wpst-purchase .actions {
  text-align: right !important;
  margin-top: 12px !important;
}

/* If any heading sneaks inside the form, hide it */
.wpst-purchase h1,
.wpst-purchase h2,
.wpst-purchase h3 { display: none !important; }


/* ===== WPST: Manage Ticket & Ticket Page — minimal, scoped fixes ===== */

/* Common accent for plugin UI only */
body.single-wpst_ticket .wpst-ticket,
.wpst-manage { --wpst-accent: #25388A; }

/* Action row layout (prevents crowded buttons) */
.wpst-manage .wpst-actions,
.wpst-ticket .wpst-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin: 10px 0 16px;
}

/* Normalize buttons within WPST areas only */
.wpst-manage .button,
.wpst-ticket .button,
.wpst-manage .wpst-btn,
.wpst-ticket .wpst-btn,
.wpst-manage a.button,
.wpst-ticket a.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 9999px;
  text-decoration: none !important;
  font-weight: 600;
  border: 1px solid transparent;
  line-height: 1.1;
  white-space: nowrap;
}

/* Primary/secondary color treatment (scoped) */
.wpst-manage .button.button-primary,
.wpst-ticket .button.button-primary,
.wpst-manage .wpst-btn--primary,
.wpst-ticket .wpst-btn--primary {
  background: var(--wpst-accent);
  color: #fff !important;
  border-color: var(--wpst-accent);
}

.wpst-manage .button:not(.button-primary),
.wpst-ticket .button:not(.button-primary),
.wpst-manage .wpst-btn--muted,
.wpst-ticket .wpst-btn--muted {
  background: #eef2f7;
  color: #111 !important;
  border-color: #d5dbe3;
}

/* Ticket page: QR box (if template provides .wpst-qr wrapper) */
body.single-wpst_ticket .wpst-qr,
body.single-wpst_ticket .wpst-qr-img {
  width: 240px;
  height: 240px;
  max-width: 100%;
  border-radius: 12px;
  background: #f4f6fb;
  border: 1px dashed #cdd6e1;
  display: block;
}

/* When theme makes buttons tiny chips, force readable size here only */
body.single-wpst_ticket .wpst-ticket .button,
.wpst-manage .button {
  font-size: 16px;
}

/* Space around ticket meta rows so it doesn’t feel cramped */
body.single-wpst_ticket .wpst-ticket .wpst-meta-row { margin: 10px 0; }

/* ------- WPST: Force sane buttons on Manage & Ticket pages ------- */

/* Scope: single ticket & manage-ticket view containers */
body.single-wpst_ticket .entry-content,
.wpst-manage,
body.page .entry-content .wpst-manage {
  --wpst-accent: #25388A;
}

/* Action row */
body.single-wpst_ticket .entry-content .wpst-actions,
.wpst-manage .wpst-actions {
  display:flex; gap:12px; flex-wrap:wrap; align-items:center;
  margin: 12px 0 16px;
}

/* Hit ALL common button types inside our areas, with priority */
body.single-wpst_ticket .entry-content .wpst-actions a,
body.single-wpst_ticket .entry-content .wpst-actions button,
body.single-wpst_ticket .entry-content .wpst-actions input[type=submit],
.wpst-manage .wpst-actions a,
.wpst-manage .wpst-actions button,
.wpst-manage .wpst-actions input[type=submit],
/* Gutenberg's .wp-element-button and generic .button */
body.single-wpst_ticket .entry-content .wp-element-button,
.wpst-manage .wp-element-button,
body.single-wpst_ticket .entry-content .button,
.wpst-manage .button {
  display:inline-flex !important;
  align-items:center; justify-content:center;
  min-height:44px; padding:10px 18px !important;
  border-radius:9999px !important;
  text-decoration:none !important;
  font-weight:600 !important;
  line-height:1.1 !important;
  border:1px solid transparent !important;
  white-space:nowrap;
  box-shadow:none !important;
}

/* Primary */
body.single-wpst_ticket .entry-content .wpst-actions .button-primary,
body.single-wpst_ticket .entry-content .wp-element-button.is-primary,
.wpst-manage .wpst-actions .button-primary,
.wpst-manage .wp-element-button.is-primary {
  background: var(--wpst-accent) !important;
  color:#fff !important;
  border-color: var(--wpst-accent) !important;
}

/* Secondary/muted (anything not flagged primary) */
body.single-wpst_ticket .entry-content .wpst-actions a:not(.button-primary),
body.single-wpst_ticket .entry-content .wpst-actions button:not(.button-primary),
body.single-wpst_ticket .entry-content .wpst-actions input[type=submit]:not(.button-primary),
.wpst-manage .wpst-actions a:not(.button-primary),
.wpst-manage .wpst-actions button:not(.button-primary),
.wpst-manage .wpst-actions input[type=submit]:not(.button-primary) {
  background:#eef2f7 !important;
  color:#111 !important;
  border-color:#d5dbe3 !important;
}

/* Ticket page QR box visuals (wrapper or image) */
body.single-wpst_ticket .entry-content .wpst-qr,
body.single-wpst_ticket .entry-content .wpst-qr-img {
  width:240px; height:240px; max-width:100%;
  border-radius:12px; background:#f4f6fb; border:1px dashed #cdd6e1;
}
