:root {
  --wptm-primary: #09aca6;
  --wptm-primary-dark: #07908b;
  --wptm-text: #333;
  --wptm-muted: #6b7280;
  --wptm-border: #e5e7eb;
  --wptm-bg: #fff;
}

/* Search */
.wptm-search {
  margin: 20px 0 25px;
  text-align: left;
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.wptm-search-wrapper {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  width: 100%;
  max-width: 530px;
  flex: 0 1 530px;
}
.wptm-city-wrapper {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  flex: 0 0 auto;
  width: 240px;
}
.wptm-day-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  flex: 0 0 auto;
  width: 200px;
}
#wptm-day-filter {
  width: 100%;
  padding: 10px 16px;
  border: 1.5px solid #d3d3d3;
  border-radius: 8px;
  font-size: 16px;
  color: var(--wptm-text);
  background-color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease-in-out;
  box-sizing: border-box;
  cursor: pointer;
}
#wptm-day-filter:focus {
  outline: none;
  border-color: var(--wptm-primary);
  box-shadow: 0 0 0 3px rgba(9, 172, 166, 0.15);
}
.wptm-day-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: #e6e6e6;
  color: #444;
  font-size: 16px;
  line-height: 22px;
  padding: 0;
  cursor: pointer;
}
.wptm-day-clear:hover { background: #d0d0d0; }
.wptm-day-wrapper.has-value #wptm-day-filter::-webkit-calendar-picker-indicator { display: none; }
.wptm-day-wrapper.has-value #wptm-day-filter { padding-right: 36px; }

.wptm-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 30px 0 10px;
}
.wptm-pagination .wptm-page,
.wptm-pagination .wptm-page-gap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border: 1.5px solid #d3d3d3;
  border-radius: 8px;
  background: #fff;
  color: var(--wptm-text);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}
.wptm-pagination button.wptm-page { font-family: inherit; }
.wptm-pagination button.wptm-page:hover:not(.is-disabled) {
  border-color: var(--wptm-primary);
  color: var(--wptm-primary);
}
.wptm-pagination .wptm-page-gap {
  border-color: transparent;
  background: transparent;
}
.wptm-pagination a.wptm-page:hover {
  border-color: var(--wptm-primary);
  color: var(--wptm-primary);
}
.wptm-pagination .wptm-page.is-current {
  background: var(--wptm-primary);
  border-color: var(--wptm-primary);
  color: #fff;
  cursor: default;
}
.wptm-pagination .wptm-page.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
#wptm-city-filter {
  width: 100%;
  padding: 10px 36px 10px 16px;
  border: 1.5px solid #d3d3d3;
  border-radius: 8px;
  font-size: 16px;
  color: var(--wptm-text);
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease-in-out;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
#wptm-city-filter:focus {
  outline: none;
  border-color: var(--wptm-primary);
  box-shadow: 0 0 0 3px rgba(9, 172, 166, 0.15);
}
.wptm-search-wrapper svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  stroke: var(--wptm-primary);
  opacity: 0.8;
}
#wptm-filter {
  width: 100%;
  padding: 10px 16px 10px 42px;
  border: 1.5px solid #d3d3d3;
  border-radius: 8px;
  font-size: 16px;
  color: var(--wptm-text);
  background-color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease-in-out;
  box-sizing: border-box;
}
#wptm-filter:focus {
  outline: none;
  border-color: var(--wptm-primary);
  box-shadow: 0 0 0 3px rgba(9, 172, 166, 0.15);
}
#wptm-filter::placeholder {
  color: #888;
}
.wptm-no-results {
  margin-top: 20px;
  color: #555;
  font-size: 15px;
}

/* List */
.wptm-events {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.wptm-events.wptm-layout-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
.wptm-empty {
  color: var(--wptm-muted);
  font-size: 15px;
}

/* Card */
.wptm-item {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: space-between;
  gap: 0;
  background: var(--wptm-bg);
  border: 1px solid var(--wptm-border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.wptm-item:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}
.wptm-item-content {
  flex: 0 0 45%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 18px 22px;
}

/* Top row: date badge + title */
.wptm-item-top {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.wptm-item-date {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  width: 42px;
  padding-top: 2px;
  text-align: left;
  line-height: 1;
}
.wptm-item-date-month {
  font-size: 12px;
  font-weight: 700;
  color: var(--wptm-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.wptm-item-date-day {
  font-size: 32px;
  font-weight: 700;
  color: var(--wptm-text);
  margin-top: 4px;
  line-height: 1;
}
.wptm-item-title-col {
  flex: 1;
  min-width: 0;
}
.wptm-item-datetime {
  display: block;
  font-size: 13px;
  color: var(--wptm-muted);
  margin-bottom: 4px;
}
.wptm-item-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--wptm-text);
  text-transform: uppercase;
  letter-spacing: 0.2px;
}

/* Bottom row */
.wptm-item-bottom {
  margin-top: 12px;
}
.wptm-item-location {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--wptm-muted);
}
.wptm-item-location-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.wptm-item-location-icon svg {
  width: 14px;
  height: 14px;
  fill: var(--wptm-muted);
}
.wptm-item-description {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.5;
  color: #555;
}
.wptm-item-tags {
  margin: 0 0 14px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.wptm-item-price {
  display: inline-block;
  padding: 3px 10px;
  background: #fff;
  color: #555;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  border: 1px solid #d3d3d3;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.wptm-item-price .woocommerce-Price-amount,
.wptm-item-price bdi {
  color: inherit;
}

/* Buttons */
.wptm-item-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
button.wptm-btn,
a.wptm-btn {
  display: inline-block;
  padding: 9px 20px;
  border-radius: 6px !important;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  border: 1.5px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.wptm-btn-primary {
  background: var(--wptm-primary);
  color: #fff;
  border-color: var(--wptm-primary);
}
.wptm-btn-primary:hover {
  background: var(--wptm-primary-dark);
  border-color: var(--wptm-primary-dark);
  color: #fff;
}
.wptm-btn-secondary {
  background: #fff;
  color: var(--wptm-text);
  border-color: #d3d3d3;
}
.wptm-btn-secondary:hover {
  background: #f8f8f8;
  border-color: #b8b8b8;
  color: var(--wptm-text);
}
.wptm-details-actions [hidden],
.wptm-item-buttons [hidden] {
  display: none !important;
}
.wptm-btn-soldout {
  display: inline-block;
  padding: 3px 10px;
  background: #fff;
  color: #555;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  border: 1px solid #d3d3d3;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: not-allowed;
  pointer-events: none;
  align-self: center;
}

/* Image */
.wptm-item-image {
  flex: 0 0 45%;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 0;
}
.wptm-item-image-inner {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: cover;
}

/* Responsive */
@media (max-width: 1024px) {
  .wptm-item-title {
    font-size: 20px;
  }
  .wptm-item-content {
    padding: 16px 18px;
  }
}

@media (max-width: 768px) {
  .wptm-events,
  .wptm-events.wptm-layout-grid {
    gap: 16px;
  }
  .wptm-item {
    flex-direction: column-reverse;
    gap: 0;
  }
  .wptm-item-image {
    width: 100%;
    flex: 0 0 auto;
  }
  .wptm-item-image-inner {
    width: 100%;
    height: auto;
    max-height: 220px;
  }
  .wptm-item-content {
    padding: 16px;
    width: 100%;
  }
  .wptm-item-top {
    gap: 14px;
  }
  .wptm-item-date {
    width: 54px;
  }
  .wptm-item-date-day {
    font-size: 26px;
  }
  .wptm-item-title {
    font-size: 17px;
  }
  .wptm-item-buttons {
    gap: 8px;
  }
  .wptm-item-buttons .wptm-btn {
    flex: 1 1 auto;
  }
  #wptm-filter {
    font-size: 15px;
    padding: 9px 14px 9px 40px;
  }
}

@media (max-width: 480px) {
  .wptm-search {
    margin: 12px 0 18px;
  }
  .wptm-item-content {
    padding: 14px;
  }
  .wptm-item-top {
    gap: 12px;
  }
  .wptm-item-date {
    width: 44px;
  }
  .wptm-item-date-day {
    font-size: 22px;
  }
  .wptm-item-title {
    font-size: 16px;
    letter-spacing: 0;
  }
  .wptm-item-datetime {
    font-size: 12px;
  }
  .wptm-item-description {
    font-size: 13px;
  }
  button.wptm-btn,
  a.wptm-btn {
    padding: 8px 14px;
    font-size: 13px;
  }
  .wptm-item-buttons {
    flex-direction: column;
  }
  .wptm-item-buttons .wptm-btn {
    width: 100%;
  }
  .wptm-item-buttons .wptm-btn-soldout {
    width: auto;
    align-self: flex-start;
  }
  #wptm-filter {
    padding: 9px 12px 9px 38px;
  }
  .wptm-search-wrapper svg {
    left: 12px;
    width: 16px;
    height: 16px;
  }
}

/* Modal */
.wptm-modal[hidden] {
  display: none;
}
.wptm-interest-content {
  position: relative;
  background: #fff;
  border-radius: 10px;
  padding: 28px 28px 22px;
  width: min(480px, 92vw);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}
.wptm-interest-close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--wptm-muted);
  padding: 4px;
  line-height: 1;
}
.wptm-interest-header h3 {
  margin: 0 0 6px;
  font-size: 20px;
  color: var(--wptm-text);
}
.wptm-interest-event-name {
  margin: 0 0 10px;
  color: var(--wptm-primary);
  font-weight: 600;
  font-size: 15px;
}
.wptm-interest-intro {
  margin: 0 0 18px;
  font-size: 14px;
  color: var(--wptm-muted);
  line-height: 1.45;
}
.wptm-interest-field {
  margin-bottom: 12px;
}
.wptm-interest-field label {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--wptm-text);
}
.wptm-interest-field input,
.wptm-interest-field textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid #d3d3d3;
  border-radius: 6px;
  font-size: 14px;
  box-sizing: border-box;
  font-family: inherit;
}
.wptm-interest-field input:focus,
.wptm-interest-field textarea:focus {
  outline: none;
  border-color: var(--wptm-primary);
  box-shadow: 0 0 0 3px rgba(9, 172, 166, 0.15);
}
.wptm-interest-feedback {
  margin: 4px 0 10px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
}
.wptm-interest-feedback.is-success {
  background: #e8f7ee;
  color: #1e6b3a;
}
.wptm-interest-feedback.is-error {
  background: #fdecec;
  color: #b32d2e;
}
.wptm-interest-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}
.wptm-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wptm-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}
.wptm-modal-content {
  position: relative;
  background: #fff;
  border-radius: 10px;
  padding: 28px;
  width: min(440px, 92vw);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}
.wptm-modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: var(--wptm-muted);
}
.wptm-modal-title {
  margin: 0 0 6px;
  font-size: 20px;
}
.wptm-modal-event {
  margin: 0 0 16px;
  color: var(--wptm-muted);
  font-size: 14px;
}
.wptm-modal-content input[type="text"],
.wptm-modal-content input[type="email"],
.wptm-modal-content input[type="tel"] {
  width: 100%;
  padding: 10px 12px;
  box-sizing: border-box;
  border: 1.5px solid #d3d3d3;
  border-radius: 6px;
  font-size: 15px;
}
.wptm-modal-content input:focus {
  outline: none;
  border-color: var(--wptm-primary);
  box-shadow: 0 0 0 3px rgba(9, 172, 166, 0.15);
}
.wptm-submit-btn {
  width: 100%;
}
.wptm-form-feedback {
  margin-top: 8px;
  min-height: 1.2em;
  font-size: 14px;
}
.wptm-form-feedback.is-error {
  color: #dc2626;
}
.wptm-form-feedback.is-success {
  color: var(--wptm-primary);
}

/* Details modal */
body.wptm-modal-open {
  overflow: hidden;
}
.wptm-modal-details .wptm-details-content {
  position: relative;
  background: #fff;
  border-radius: 10px;
  width: min(800px, 94vw);
  max-height: 92vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  z-index: 1;
}
.wptm-details-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #333;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
.wptm-details-close:hover {
  background: #fff;
  color: var(--wptm-primary);
}
.wptm-details-img {
  width: 100%;
  background: #f3f4f6;
  flex-shrink: 0;
}
.wptm-details-img img {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: cover;
}
.wptm-details-header {
  padding: 20px 24px 12px;
  border-bottom: 1px solid var(--wptm-border);
  flex-shrink: 0;
}
.wptm-details-datetime {
  font-size: 13px;
  color: var(--wptm-muted);
  margin-bottom: 6px;
}
.wptm-details-title {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 700;
  color: var(--wptm-text);
  line-height: 1.3;
}
.wptm-details-location {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--wptm-muted);
}
.wptm-details-location-icon svg {
  width: 16px;
  height: 16px;
  fill: var(--wptm-primary);
}
.wptm-details-body {
  padding: 18px 24px;
  overflow-y: auto;
  flex: 1;
  color: var(--wptm-text);
  font-size: 15px;
  line-height: 1.6;
}
.wptm-details-summary {
  margin: 0 0 14px;
  font-size: 15px;
  color: #444;
  font-weight: 500;
}
.wptm-details-content-html {
  font-size: 15px;
  line-height: 1.6;
  color: #333;
}
.wptm-details-content-html p {
  margin: 0 0 12px;
}
.wptm-details-content-html ul,
.wptm-details-content-html ol {
  margin: 0 0 12px 20px;
}
.wptm-details-content-html a {
  color: var(--wptm-primary);
}
.wptm-details-content-html img {
  max-width: 100%;
  height: auto;
}
.wptm-details-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--wptm-border);
  background: #fafafa;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.wptm-details-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--wptm-text);
  flex: 1 1 auto;
}
.wptm-details-price .woocommerce-Price-amount,
.wptm-details-price bdi {
  color: inherit;
}
.wptm-details-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

@media (max-width: 600px) {
  .wptm-details-header {
    padding: 16px 18px 10px;
  }
  .wptm-details-title {
    font-size: 18px;
  }
  .wptm-details-body {
    padding: 14px 18px;
  }
  .wptm-details-footer {
    padding: 12px 18px;
  }
  .wptm-details-img img {
    max-height: 220px;
  }
}

/* Filter transitions */
.wptm-item {
  transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out,
    box-shadow 0.2s ease;
}
.wptm-item.is-hidden {
  display: none;
}

/* Quantity input next to Tickets button */
.wptm-qty-input {
  width: 64px;
  padding: 6px 8px;
  border: 1px solid var(--wptm-border);
  border-radius: 4px;
  font-size: 14px;
  text-align: center;
}
.wptm-item-buttons,
.wptm-details-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.wptm-qty-input-error {
  border-color: #d9534f;
  box-shadow: 0 0 0 2px rgba(217, 83, 79, 0.15);
}
.wptm-qty-warning {
  flex-basis: 100%;
  margin-top: 4px;
  padding: 6px 10px;
  background: #fdecea;
  color: #a12622;
  border: 1px solid #f5c2bf;
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.3;
}

.wptm-details-img {
  position: relative;
}
.wptm-details-calendar {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 5;
}
.wptm-cal-dropdown {
  position: relative;
  display: inline-block;
}
.wptm-cal-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border: none;
  border-radius: 6px !important;
  background: #f7b414 !important;
  background-color: #f7b414 !important;
  color: #fff !important;
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}
.wptm-cal-toggle:hover {
  background: #d99a08 !important;
  background-color: #d99a08 !important;
  color: #fff !important;
}
.wptm-cal-toggle .wptm-cal-icon {
  flex-shrink: 0;
}
.wptm-cal-toggle .wptm-cal-caret {
  transition: transform 0.15s ease;
}
.wptm-cal-dropdown.is-open .wptm-cal-toggle .wptm-cal-caret {
  transform: rotate(180deg);
}
.wptm-cal-menu {
  position: absolute;
  bottom: calc(100% + 4px);
  right: 0;
  z-index: 10;
  min-width: 220px;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.wptm-cal-menu li {
  margin: 0;
}
.wptm-cal-item {
  display: block;
  padding: 8px 14px;
  color: #1f2937;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
}
.wptm-cal-item:hover {
  background: #f3f4f6;
  color: #111827;
}

.wptm-single-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin: 24px 0;
  padding: 16px 20px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
}
.wptm-single-cta-price {
  font-size: 20px;
  font-weight: 600;
  color: #111827;
}
.wptm-single-cta-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
