/**
 * Sundeer Tickets — Frontend CSS
 */

/* Ticket Selection Form */
.sndt-tickets-form {
  margin: 0;
  width: 100%;
}

.sndt-ticket-list {
  margin-bottom: 10px;
}

.sndt-ticket-item {
  display: block;
  padding: 0;
  border: none;
  border-radius: 0;
  margin-bottom: 12px;
  background: transparent;
}

.sndt-ticket-item:hover {
  box-shadow: none;
}

.sndt-ticket-item.sndt-ticket-unavailable {
  opacity: 0.5;
}

.sndt-ticket-info {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
}

.sndt-ticket-name {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  flex: 1;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.15);
  width: 100%;
}

.sndt-ticket-desc {
  margin: 4px 0 0;
  font-size: 13px;
  color: inherit;
  opacity: 0.7;
  width: 100%;
}

.sndt-ticket-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}

.sndt-ticket-price {
  font-weight: 700;
  font-size: 16px;
}

.sndt-unavailable-reason {
  color: inherit;
  opacity: 0.6;
  font-style: italic;
  font-size: 13px;
  margin-top: 4px;
}

/* Quantity selector */
.sndt-ticket-qty {
  display: flex;
  align-items: center;
  gap: 0;
}

.sndt-qty-btn {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  background: rgba(255, 255, 255, 0.3);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  user-select: none;
  color: inherit;
}

.sndt-qty-btn:hover {
  background: rgba(255, 255, 255, 0.5);
}

body[data-button-style*="slightly_rounded"] button.sndt-qty-minus {
  border-radius: 4px 0 0 4px !important;
}
body[data-button-style*="slightly_rounded"] button.sndt-qty-plus {
  border-radius: 0 4px 4px 0 !important;
}

.sndt-qty-input {
  height: 34px;
  text-align: center;
  border: 1px solid rgba(0, 0, 0, 0.2) !important;
  border-left: none !important;
  border-right: none !important;
  font-size: 15px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.6);
  color: inherit;
  -moz-appearance: textfield;
  appearance: textfield;
  border-radius: 0 !important;
}

.sndt-qty-input::-webkit-inner-spin-button,
.sndt-qty-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Footer / Total */
.sndt-tickets-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  gap: 10px;
}

.sndt-tickets-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  width: 100%;
}

.sndt-total-label {
  font-size: 15px;
  font-weight: 500;
}

.sndt-total-amount {
  font-size: 18px;
  font-weight: 700;
}

.sndt-buy-btn {
  width: 100%;
  padding: 12px 30px;
  background: #8b6914;
  color: #fff;
  border: none;
  border-radius: 25px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.sndt-buy-btn:hover {
  background: #73570f;
}

.sndt-buy-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Loading state */
.sndt-form-loading {
  pointer-events: none;
  opacity: 0.6;
}

.sndt-buy-btn.sndt-loading {
  position: relative;
  opacity: 0.7;
  min-height: 42px;
}

.sndt-buy-btn.sndt-loading::after {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: sndt-spin 0.6s linear infinite;
}

@keyframes sndt-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Event Card */
.sndt-event-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  max-width: 700px;
  margin: 0 auto 20px;
}

.sndt-event-logo img {
  max-width: 150px;
  border-radius: 8px;
}

.sndt-event-title {
  margin: 0 0 8px;
}

.sndt-event-date,
.sndt-event-venue {
  color: #666;
  margin-bottom: 5px;
}

/* Attendee Form */
.sndt-attendee-form-wrap {
  max-width: 900px;
  margin: 0 auto;
}

.sndt-attendee-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 30px;
  margin-bottom: 3rem;
}

@media (max-width: 768px) {
  .sndt-attendee-layout {
    grid-template-columns: 1fr;
  }
}

.sndt-attendee-section {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 20px;
  margin-bottom: 15px;
}

.sndt-attendee-section h3 {
  margin: 0 0 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sndt-attendee-price {
  font-size: 14px;
  font-weight: 600;
  color: #2c3e50;
}

.sndt-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

@media (max-width: 600px) {
  .sndt-field-grid {
    grid-template-columns: 1fr;
  }
}

.sndt-field label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 4px;
}

.sndt-field input[type="text"],
.sndt-field input[type="email"],
.sndt-field input[type="tel"],
.sndt-field select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
}

.sndt-field .required {
  color: #e74c3c;
}

.sndt-custom-fields {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #e0e0e0;
}

.sndt-discount-badge {
  display: inline-block;
  background: #d4edda;
  color: #155724;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 600;
  margin-left: 5px;
}

/* Order Summary Sidebar */
.sndt-order-summary {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 20px;
  position: sticky;
  top: 20px;
}

.sndt-order-summary h3 {
  margin: 0 0 15px;
}

.sndt-summary-event {
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e0e0e0;
}

.sndt-summary-line {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  font-size: 14px;
}

.sndt-summary-discount-line {
  color: #155724;
  font-weight: 600;
}

.sndt-summary-total {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  margin-top: 10px;
  border-top: 2px solid #2c3e50;
  font-size: 16px;
}

.sndt-checkout-btn {
  width: 100%;
  padding: 12px;
  background: #2c3e50;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 15px;
  transition: background 0.2s;
}

.sndt-checkout-btn:hover {
  background: #34495e;
}

/* Error/Notice messages */
.sndt-error {
  color: #e74c3c;
  padding: 10px;
  background: #fdedec;
  border-radius: 4px;
}

.sndt-notice {
  color: #856404;
  padding: 10px;
  background: #fff3cd;
  border-radius: 4px;
}
