/*
 * Twentysix Események Styles
 * Main color: #000
 * Font: Roboto
 */

:root {
  --tws-black: #000000;
  --tws-white: #ffffff;
  --tws-gray-light: #f9f9f9;
  --tws-gray-medium: #e5e5e5;
  --tws-gray-dark: #333333;
  --tws-text: #444444;
  --tws-primary: var(--tws-black);
  --tws-radius: 4px;
  --tws-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  --tws-transition: all 0.2s ease-in-out;
  --tws-font: "Roboto", sans-serif;
}

/* Base specific wrapper to prevent theme overrides */
#tws-event-plugin-wrapper {
  font-family: var(--tws-font) !important;
  color: var(--tws-text) !important;
  line-height: 1.6 !important;
  padding: 0 0 40px 0 !important;
}

#tws-event-plugin-wrapper * {
  box-sizing: border-box !important;
}

#tws-event-plugin-wrapper .tws-container {
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 0 20px !important;
}

/* Base Buttons */
#tws-event-plugin-wrapper .tws-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 12px 24px !important;
  text-align: center !important;
  text-decoration: none !important;
  font-family: var(--tws-font) !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  border: 2px solid var(--tws-primary) !important;
  transition: var(--tws-transition) !important;
  text-transform: uppercase !important;
  font-size: 14px !important;
  letter-spacing: 1px !important;
  border-radius: var(--tws-radius) !important;
  box-shadow: none !important;
  margin: 0 !important;
  line-height: 1 !important;
}

#tws-event-plugin-wrapper .tws-btn-primary {
  background-color: var(--tws-primary) !important;
  color: var(--tws-white) !important;
}

#tws-event-plugin-wrapper .tws-btn-primary:hover {
  background-color: var(--tws-gray-dark) !important;
  color: var(--tws-white) !important;
  border-color: var(--tws-gray-dark) !important;
}

#tws-event-plugin-wrapper .tws-btn-wide {
  padding: 14px 40px !important;
  font-size: 16px !important;
}

#tws-event-plugin-wrapper .tws-btn:disabled {
  background-color: #cccccc !important;
  border-color: #cccccc !important;
  color: #ffffff !important;
  cursor: not-allowed !important;
}

/* Hero Header */
#tws-event-plugin-wrapper .tws-hero-header {
  position: relative !important;
  margin-top: -150px !important;
  padding: 270px 20px 80px 20px !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  margin-bottom: 50px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  overflow: hidden !important;
}

#tws-event-plugin-wrapper .tws-hero-no-bg {
  background-color: var(--tws-gray-dark) !important;
}

#tws-event-plugin-wrapper .tws-hero-overlay {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: rgba(0, 0, 0, 0.5) !important;
  z-index: 1 !important;
}

#tws-event-plugin-wrapper .tws-hero-title {
  position: relative !important;
  z-index: 2 !important;
  color: var(--tws-white) !important;
  font-size: 3rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.2 !important;
}

/* Event List Grid */
#tws-event-plugin-wrapper .tws-events-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 30px !important;
  margin: 40px auto !important;
  max-width: 1300px !important;
  font-family: var(--tws-font) !important;
  padding: 0 20px !important;
}

/* Event Cards */
#tws-event-plugin-wrapper .tws-event-card {
  background: var(--tws-white) !important;
  border-radius: var(--tws-radius) !important;
  box-shadow: var(--tws-shadow) !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  transition: var(--tws-transition) !important;
  border: 1px solid var(--tws-gray-medium) !important;
}

#tws-event-plugin-wrapper .tws-event-card:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
}

#tws-event-plugin-wrapper .tws-event-card-header {
  position: relative !important;
}

#tws-event-plugin-wrapper .tws-event-card-img {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: cover !important;
  display: block !important;
}

#tws-event-plugin-wrapper .tws-event-card-price {
  position: absolute !important;
  bottom: 15px !important;
  right: 15px !important;
  background: var(--tws-primary) !important;
  color: var(--tws-white) !important;
  padding: 6px 12px !important;
  border-radius: var(--tws-radius) !important;
  font-weight: 700 !important;
  font-size: 14px !important;
}

#tws-event-plugin-wrapper .tws-event-card-body {
  padding: 20px !important;
  flex: 1 !important;
}

#tws-event-plugin-wrapper .tws-event-card-title {
  font-size: 18px !important;
  font-weight: 700 !important;
  margin: 0 0 10px 0 !important;
  color: var(--tws-black) !important;
  text-transform: uppercase !important;
  line-height: 1.3 !important;
}

#tws-event-plugin-wrapper .tws-event-card-date {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  color: var(--tws-text) !important;
  font-size: 14px !important;
}

#tws-event-plugin-wrapper .tws-event-card-date .dashicons {
  color: var(--tws-gray-dark) !important;
}

#tws-event-plugin-wrapper .tws-event-card-footer {
  padding: 20px !important;
  border-top: 1px solid var(--tws-gray-medium) !important;
}

#tws-event-plugin-wrapper .tws-btn-block {
  width: 100% !important;
  display: block !important;
}

/* Single Event Page */
#tws-event-plugin-wrapper .tws-event-top-section {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 40px !important;
  margin-bottom: 60px !important;
}

#tws-event-plugin-wrapper .tws-event-left-col,
#tws-event-plugin-wrapper .tws-event-right-col {
  flex: 1 1 calc(50% - 20px) !important;
}

#tws-event-plugin-wrapper .tws-event-main-img {
  width: 100% !important;
  height: auto !important;
  object-fit: cover !important;
  aspect-ratio: 1 / 1 !important;
  display: block !important;
  border-radius: var(--tws-radius) !important;
}

/* Custom specific title overriding theme h1 */
#tws-event-plugin-wrapper .tws-event-title {
  font-size: 2.2rem !important;
  font-weight: 700 !important;
  margin: 0 0 15px 0 !important;
  text-transform: uppercase !important;
  color: var(--tws-black) !important;
  line-height: 1.2 !important;
  padding: 0 !important;
  background: none !important;
  border: none !important;
}

#tws-event-plugin-wrapper .tws-event-price-large {
  font-size: 22px !important;
  font-weight: 700 !important;
  margin-bottom: 25px !important;
  color: var(--tws-primary) !important;
  display: inline-block !important;
  padding: 6px 12px !important;
  background: var(--tws-gray-light) !important;
  border-radius: var(--tws-radius) !important;
}

#tws-event-plugin-wrapper .tws-event-description {
  font-size: 15px !important;
  line-height: 1.7 !important;
  margin-bottom: 30px !important;
  color: var(--tws-text) !important;
}

#tws-event-plugin-wrapper .tws-event-description p {
  margin-bottom: 15px !important;
}

/* Accordions */
#tws-event-plugin-wrapper .tws-event-accordions {
  margin-bottom: 30px !important;
  border-top: 1px solid var(--tws-gray-medium) !important;
}

#tws-event-plugin-wrapper .tws-accordion {
  border-bottom: 1px solid var(--tws-gray-medium) !important;
  margin: 0 !important;
  padding: 0 !important;
}

#tws-event-plugin-wrapper .tws-accordion-header {
  padding: 15px 0 !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  cursor: pointer !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  user-select: none !important;
  color: var(--tws-black) !important;
  transition: color 0.3s !important;
  background: transparent !important;
  border: none !important;
}

#tws-event-plugin-wrapper .tws-accordion-icon {
  font-size: 20px !important;
  font-weight: 300 !important;
  transition: transform 0.3s ease !important;
}

#tws-event-plugin-wrapper .tws-accordion.active .tws-accordion-icon {
  transform: rotate(45deg) !important;
}

#tws-event-plugin-wrapper .tws-accordion-content {
  display: none;
  padding: 0 0 15px 0 !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
  color: var(--tws-gray-dark) !important;
}

/* Clean Form Section */
#tws-event-plugin-wrapper .tws-ticket-section-inner {
  max-width: none !important;
  margin: 0 !important;
  background: transparent !important;
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
}

#tws-event-plugin-wrapper .tws-section-title-wrapper {
  margin-bottom: 30px !important;
}

#tws-event-plugin-wrapper .tws-ticket-title {
  font-size: 24px !important;
  font-weight: 700 !important;
  color: var(--tws-black) !important;
  margin: 0 0 10px 0 !important;
  text-transform: uppercase !important;
  padding: 0 !important;
  background: none !important;
  border: none !important;
}

#tws-event-plugin-wrapper .tws-line-holder hr {
  margin: 0 !important;
  border: none !important;
  border-bottom: 2px solid var(--tws-primary) !important;
  width: 60px !important;
  height: 0 !important;
  background: transparent !important;
}

#tws-event-plugin-wrapper .tws-spacer {
  margin: 30px 0 !important;
}
#tws-event-plugin-wrapper .tws-spacer hr {
  width: 100% !important;
  border-bottom: 1px solid var(--tws-gray-medium) !important;
}

#tws-event-plugin-wrapper .tws-ticket-form-modern {
  background: linear-gradient(
    180deg,
    #ffffff 0%,
    var(--tws-gray-light) 100%
  ) !important;
  padding: 32px !important;
  border: 1px solid var(--tws-gray-medium) !important;
  border-radius: 16px !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.07) !important;
  margin: 0 !important;
}

#tws-event-plugin-wrapper .tws-form-row {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 20px !important;
  margin: 0 !important;
  padding: 0 !important;
}

#tws-event-plugin-wrapper .tws-align-center {
  align-items: center !important;
}

#tws-event-plugin-wrapper .tws-action-row {
  justify-content: flex-start !important;
}

#tws-event-plugin-wrapper .tws-form-col-full {
  width: 100% !important;
}

/* Ticket Row List Styling - HIGH SPECIFICITY */
#tws-event-plugin-wrapper ul.tws-ticket-row-list {
  list-style: none !important;
  list-style-type: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

#tws-event-plugin-wrapper ul.tws-ticket-row-list li.tws-ticket-row {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 18px 22px !important;
  margin: 0 0 14px 0 !important;
  background: var(--tws-white) !important;
  border: 1px solid var(--tws-gray-medium) !important;
  border-left: 3px solid var(--tws-gray-medium) !important;
  border-radius: 12px !important;
  transition: var(--tws-transition) !important;
  list-style: none !important;
}

#tws-event-plugin-wrapper ul.tws-ticket-row-list li.tws-ticket-row:last-child {
  margin-bottom: 0 !important;
}

#tws-event-plugin-wrapper ul.tws-ticket-row-list li.tws-ticket-row:hover {
  border-color: var(--tws-gray-medium) !important;
  border-left-color: var(--tws-black) !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08) !important;
  transform: translateY(-2px) !important;
}

#tws-event-plugin-wrapper .tws-row-disabled {
  background: #f1f1f1 !important;
  opacity: 0.6 !important;
}

#tws-event-plugin-wrapper .tws-row-disabled:hover {
  border-color: var(--tws-gray-medium) !important;
  border-left-color: var(--tws-gray-medium) !important;
  box-shadow: none !important;
  transform: none !important;
}

#tws-event-plugin-wrapper .tws-row-left {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 5px !important;
}

#tws-event-plugin-wrapper .tws-row-right {
  display: flex !important;
  align-items: center !important;
  gap: 15px !important;
}

#tws-event-plugin-wrapper .tws-add-to-cart-row-btn {
  padding: 10px 20px !important;
  font-size: 14px !important;
}

#tws-event-plugin-wrapper .tws-date-text {
  font-size: 16px !important;
  font-weight: 500 !important;
  color: var(--tws-black) !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 0 !important;
}

#tws-event-plugin-wrapper .tws-date-text .dashicons {
  font-size: 18px !important;
  height: 18px !important;
  width: 18px !important;
  color: var(--tws-gray-dark) !important;
  margin: 0 !important;
}

#tws-event-plugin-wrapper .tws-status-text {
  font-size: 14px !important;
  font-weight: 700 !important;
  margin: 0 !important;
  padding: 0 !important;
}

#tws-event-plugin-wrapper .tws-text-success {
  color: #27ae60 !important;
}

#tws-event-plugin-wrapper .tws-text-error {
  color: #c0392b !important;
}

/* Quantity and Submit Block */
#tws-event-plugin-wrapper .tws-qty-block {
  display: flex !important;
  align-items: center !important;
  flex-direction: row !important;
  gap: 15px !important;
  margin: 0 !important;
  padding: 0 !important;
}

#tws-event-plugin-wrapper .tws-qty-label-text {
  font-size: 15px !important;
  font-weight: 700 !important;
  color: var(--tws-black) !important;
  margin: 0 !important;
  padding: 0 !important;
}

#tws-event-plugin-wrapper .tws-qty-controls {
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch !important;
  border: 1px solid var(--tws-gray-medium) !important;
  border-radius: var(--tws-radius) !important;
  overflow: hidden !important;
  height: 44px !important;
  width: auto !important;
  background: var(--tws-white) !important;
  margin: 0 !important;
  padding: 0 !important;
}

#tws-event-plugin-wrapper .tws-qty-btn {
  background: var(--tws-gray-light) !important;
  border: none !important;
  width: 40px !important;
  height: 44px !important;
  font-size: 20px !important;
  line-height: 1 !important;
  cursor: pointer !important;
  color: var(--tws-black) !important;
  transition: var(--tws-transition) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

#tws-event-plugin-wrapper .tws-qty-btn:hover {
  background: var(--tws-gray-medium) !important;
}

#tws-event-plugin-wrapper input.tws-qty-input,
#tws-event-plugin-wrapper input[type="number"].tws-qty-input {
  width: 60px !important;
  max-width: 60px !important;
  height: 44px !important;
  border: none !important;
  border-left: 1px solid var(--tws-gray-medium) !important;
  border-right: 1px solid var(--tws-gray-medium) !important;
  text-align: center !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  font-family: var(--tws-font) !important;
  color: var(--tws-black) !important;
  -moz-appearance: textfield !important;
  padding: 0 !important;
  margin: 0 !important;
  background: var(--tws-white) !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

#tws-event-plugin-wrapper input.tws-qty-input:focus {
  outline: none !important;
}

#tws-event-plugin-wrapper input.tws-qty-input::-webkit-outer-spin-button,
#tws-event-plugin-wrapper input.tws-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
}

#tws-event-plugin-wrapper .tws-submit-block {
  display: flex !important;
  margin: 0 !important;
  padding: 0 !important;
}

#tws-event-plugin-wrapper .tws-cart-message {
  text-align: center !important;
  margin-top: 20px !important;
  font-weight: 500 !important;
  padding: 10px !important;
  border-radius: var(--tws-radius) !important;
}

#tws-event-plugin-wrapper .tws-cart-message.success {
  color: #27ae60 !important;
}

#tws-event-plugin-wrapper .tws-cart-message.error {
  color: #c0392b !important;
}

/* Responsive */
@media (max-width: 768px) {
  #tws-event-plugin-wrapper .tws-event-top-section {
    flex-direction: column !important;
  }

  #tws-event-plugin-wrapper .tws-event-left-col,
  #tws-event-plugin-wrapper .tws-event-right-col {
    flex: 1 1 100% !important;
  }

  #tws-event-plugin-wrapper ul.tws-ticket-row-list li.tws-ticket-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 15px !important;
  }

  #tws-event-plugin-wrapper .tws-row-left,
  #tws-event-plugin-wrapper .tws-row-right {
    width: 100% !important;
    justify-content: space-between !important;
  }

  #tws-event-plugin-wrapper .tws-add-to-cart-row-btn {
    width: 100% !important;
    max-width: 150px !important;
  }

  #tws-event-plugin-wrapper .tws-events-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  #tws-event-plugin-wrapper .tws-hero-header {
    padding: 80px 15px 60px 15px !important;
  }

  #tws-event-plugin-wrapper .tws-hero-title {
    font-size: 2.2rem !important;
  }
}

@media (max-width: 480px) {
  #tws-event-plugin-wrapper .tws-events-grid {
    grid-template-columns: 1fr !important;
  }
}

/* --- AJAX Loading Overlay --- */
.tws-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tws-loading-content {
  background: #ffffff;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  text-align: center;
  max-width: 400px;
  width: 90%;
  animation: twsFadeInUp 0.4s ease forwards;
}

.tws-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #000000;
  border-radius: 50%;
  animation: twsSpin 1s linear infinite;
  margin: 0 auto 20px auto;
}

.tws-loading-text {
  font-size: 18px;
  font-weight: 600;
  color: #000000;
  margin: 0;
  font-family: "Roboto", sans-serif;
}

.tws-success-icon,
.tws-error-icon {
  font-size: 48px;
  margin-bottom: 15px;
}

.tws-success-icon .dashicons {
  font-size: 50px;
  width: 50px;
  height: 50px;
  color: #27ae60;
}

.tws-error-icon .dashicons {
  font-size: 50px;
  width: 50px;
  height: 50px;
  color: #c0392b;
}

.tws-success-text,
.tws-error-text {
  font-size: 18px;
  font-weight: 600;
  color: #000000;
  margin: 0 0 25px 0;
  font-family: "Roboto", sans-serif;
}

.tws-close-overlay-btn {
  width: 100%;
  padding: 12px;
  background: #000;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  text-transform: uppercase;
  transition: background 0.3s;
}

.tws-close-overlay-btn:hover {
  background: #333;
}

@keyframes twsSpin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes twsFadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Kiegészítők az időpont-sorban --- */
/* A sor vízszintes flex; a kiegészítők saját sorba törnek a dátum és a gomb alá.
   Mobilon a sor amúgy is oszlop, ott ez magától adódik. */
#tws-event-plugin-wrapper ul.tws-ticket-row-list li.tws-ticket-row {
  flex-wrap: wrap !important;
}

#tws-event-plugin-wrapper .tws-row-addons {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px 22px !important;
  width: 100% !important;
  margin-top: 14px !important;
  padding-top: 14px !important;
  border-top: 1px solid var(--tws-gray-medium) !important;
}

#tws-event-plugin-wrapper .tws-addon {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 !important;
  font-size: 14px !important;
  cursor: pointer !important;
}

#tws-event-plugin-wrapper .tws-addon input {
  width: 17px !important;
  height: 17px !important;
  margin: 0 !important;
  accent-color: #000000 !important;
  cursor: pointer !important;
}

#tws-event-plugin-wrapper .tws-addon-name {
  font-weight: 600 !important;
  color: var(--tws-black) !important;
}

#tws-event-plugin-wrapper .tws-addon-price {
  color: var(--tws-text) !important;
}

#tws-event-plugin-wrapper .tws-addon-note {
  color: #c0392b !important;
  font-style: italic !important;
}

#tws-event-plugin-wrapper .tws-addon-disabled,
#tws-event-plugin-wrapper .tws-addon-disabled input {
  cursor: not-allowed !important;
}

#tws-event-plugin-wrapper .tws-addon-disabled {
  opacity: 0.5 !important;
}
