

/* Live Events CSS Styles */

/* Events Page Header */
.events-header-image {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 2em;
}

.events-section {
  margin: 2em 0;
}

h2.events-section-title {
  border-bottom: 2px solid #007cba;
  padding-bottom: 0.5em;
  margin-bottom: 1.5em;
  color: #333;
}

/* Event Card Styles */
.event-card {
  border: 1px solid #ddd;
  border-radius: 8px;
  margin-bottom: 2em;
  padding: 1.5em;
  background: #fafafa;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.event-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1em;
  border-bottom: 1px solid #eee;
  padding-bottom: 0.5em;
}

.event-name {
  margin: 0;
  color: #333;
  font-size: 1.4em;
}

.event-type {
  background: #007cba;
  color: white;
  padding: 0.3em 0.8em;
  border-radius: 15px;
  font-size: 0.9em;
  font-weight: bold;
  text-transform: uppercase;
}

.event-badge {
  font-weight: bold;
  font-size: 1.5em;
  float: right;
  padding: 0.5em;
  margin-top: -3em;
  border-radius: 10px;
}
.event-badge-newly-added { background: #10B981; color: white; }
.event-badge-likely-sell-out { background: #0891B2; color: white; }
.event-badge-last-day-to-register { background: #0891B2; color: white; }
.event-badge-selling-fast { background: #F59E0B; color: white; }
.event-badge-almost-full { background: #F59E0B; color: white; }
.event-badge-registration-full { background: #FF0000; color: white; }
.event-badge-registration-closed { background: #DC2626; color: white; }
.event-badge-event-is-today { background: #DC2626; color: white; }

.event-details {
  line-height: 1.6;
}

.event-datetime, .event-location, .event-instructor, .event-cost {
  margin-bottom: 0.8em;
}

.event-description {
  margin: 1em 0;
  padding: 1em;
  background: white;
  border-left: 4px solid #007cba;
  border-radius: 4px;
}

.event-materials {
  margin: 1em 0;
  padding: 0.8em;
  background: #fff3cd;
  border-left: 4px solid #ffc107;
  border-radius: 4px;
}

/* Event Registration Section */
.event-registration {
  margin-top: 1.5em;
  padding-top: 1em;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.register-button {
  background: #28a745;
  color: white;
  padding: 0.8em 1.5em;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: background 0.3s;
}

.register-button:hover {
  background: #218838;
  color: white;
}

.registration-deadline {
  color: #333;
}

.spots-left {
  font-size: 0.9em;
  color: #666;
  font-style: italic;
}

.event-url {
  margin-top: 1em;
}

.event-url a {
  color: #007cba;
  text-decoration: none;
  font-weight: bold;
}

.event-url a:hover {
  text-decoration: underline;
}

.no-events {
  text-align: center;
  padding: 3em;
  color: #666;
  font-style: italic;
}

/* Event Registration Form */
.registration-form {
  max-width: 600px;
  margin: 2em auto;
  padding: 2em;
  background: #fafafa;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.registration-form .event-details {
  background: white;
  padding: 1.5em;
  border-radius: 6px;
  margin-bottom: 2em;
  border-left: 4px solid #007cba;
}

.registration-form .event-details h3 {
  margin-top: 0;
  color: #333;
}

.form-section {
  margin-bottom: 2em;
}

.form-section h4 {
  margin-bottom: 1em;
  color: #333;
  border-bottom: 1px solid #ddd;
  padding-bottom: 0.5em;
}

.form-field {
  margin-bottom: 1em;
}

.payment-section {
  background: #fff3cd;
  padding: 1.5em;
  border-radius: 6px;
  border-left: 4px solid #ffc107;
  margin-bottom: 2em;
}

#card-element {
  background: white;
  padding: 10px 12px;
  border-radius: 4px;
  border: 1px solid #ccc;
  margin-top: 0.5em;
  transition: border-color 0.3s;
}

#card-element.error {
  border-color: #dc3545;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

#card-errors {
  background: #f8d7da;
  color: #721c24;
  padding: 0.75rem 1rem;
  margin-top: 0.5rem;
  border: 1px solid #f5c6cb;
  border-radius: 0.375rem;
  font-size: 0.9rem;
  font-weight: 500;
  display: none;
  animation: fadeIn 0.3s ease-in;
}

#card-errors.show {
  display: block;
}

#card-errors::before {
  content: "⚠️ ";
  font-size: 1.1em;
  margin-right: 0.5rem;
}

.payment-error-banner {
  background: #dc3545;
  color: white;
  padding: 1rem 1.5rem;
  margin: 1rem 0;
  border-radius: 6px;
  font-weight: bold;
  text-align: center;
  box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
  animation: pulse 2s infinite;
}

.payment-error-banner::before {
  content: "❌ ";
  font-size: 1.2em;
  margin-right: 0.5rem;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.registration-form .register-button {
  background: #28a745;
  color: white;
  padding: 1em 2em;
  border: none;
  border-radius: 5px;
  font-size: 1.1em;
  font-weight: bold;
  cursor: pointer;
  width: 100%;
  transition: background 0.3s;
}

.registration-form .register-button:hover {
  background: #218838;
}

.registration-form .register-button:disabled {
  background: #6c757d;
  cursor: not-allowed;
}

.cost-display {
  font-size: 1.2em;
  font-weight: bold;
  color: #28a745;
  text-align: center;
  margin: 1em 0;
}

.free-event {
  color: #007cba;
}

.error-section {
  margin-bottom: 2em;
}

.guest-names-section {
  margin-top: 1.5em;
  padding: 1em;
  background: #f8f9fa;
  border-radius: 6px;
  border-left: 4px solid #007cba;
}

.guest-name-field {
  margin-bottom: 1em;
}

.discount-code-row {
  display: flex;
  gap: 8px;
  width: 100%;
  align-items: end;
}

.discount-code-row sl-input {
  flex: 1;
  min-width: 0;
}
.discount-code-row sl-button {
  flex-shrink: 0; /* Prevents button from shrinking */
}

.total-cost-display {
  font-size: 1.3em;
  font-weight: bold;
  color: #28a745;
  text-align: center;
  margin: 1em 0;
  padding: 1em;
  background: #d4edda;
  border-radius: 6px;
}

.quantity-info {
  font-size: 0.9em;
  color: #666;
  margin-top: 0.5em;
}

/* Event Registration Thank You Page */
.thankyou-container {
  max-width: 600px;
  margin: 3em auto;
  padding: 2em;
  text-align: center;
  background: #f8f9fa;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.success-icon {
  font-size: 4em;
  color: #28a745;
  margin-bottom: 1em;
}

.thankyou-title {
  color: #28a745;
  margin-bottom: 1em;
}

.event-summary {
  background: white;
  padding: 1.5em;
  border-radius: 6px;
  margin: 2em 0;
  text-align: left;
  border-left: 4px solid #007cba;
}

.receipt {
  background: white;
  padding: 1.5em;
  border-radius: 6px;
  margin: 2em 0;
  text-align: left;
}

.next-steps {
  background: #fff3cd;
  padding: 1.5em;
  border-radius: 6px;
  margin: 2em 0;
  border-left: 4px solid #ffc107;
}

.actions {
  margin-top: 2em;
}

.action-button {
  display: inline-block;
  background: #007cba;
  color: white;
  padding: 0.8em 1.5em;
  text-decoration: none;
  border-radius: 5px;
  margin: 0 0.5em;
  font-weight: bold;
  transition: background 0.3s;
}

.action-button:hover {
  background: #005a8b;
  color: white;
}

.secondary-button {
  background: #6c757d;
}

.secondary-button:hover {
  background: #545b62;
}

/* Admin Live Event Form */
fieldset.event_form li input[type=text],
fieldset.event_form li input[type=number],
fieldset.event_form li input[type=email],
fieldset.event_form li input[type=url],
fieldset.event_form li textarea {
  width: 600px;
}

fieldset.event_form li input.short {
  width: 300px;
}

fieldset.event_form li input.currency {
  width: 100px;
}

table.event {
  width: 500px;
  margin: 2em auto;
}

table.event tr th {
  font-weight: bold;
  text-align: left;
  background-color: #333;
  color: #EEE;
}

table.event tr th, table.event tr td {
  padding: 0.3em 1em;
  font-size: 125%;
}

div.event_registration_cards {
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
  justify-content: start;
}

/* Event Registration Closed Page */
.closed-container {
  max-width: 600px;
  margin: 3em auto;
  padding: 2em;
  text-align: center;
  background: #f8f9fa;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.warning-icon {
  font-size: 4em;
  color: #ffc107;
  margin-bottom: 1em;
}

.closed-title {
  color: #dc3545;
  margin-bottom: 1em;
}

.closed-container .event-summary {
  background: white;
  padding: 1.5em;
  border-radius: 6px;
  margin: 2em 0;
  text-align: left;
  border-left: 4px solid #dc3545;
}

.suggestions {
  background: #d4edda;
  padding: 1.5em;
  border-radius: 6px;
  margin: 2em 0;
  border-left: 4px solid #28a745;
}

.waitlist-form {
  display: flex;
}
.waitlist-form > sl-input[type=email] {
  min-width: 20em;
    margin-right: 0.5em;
}

/* Error messaging styles (matching checkout.html) */
.blk_error {
  display: none;
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  color: #dc2626;
  padding: 12px 16px;
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.4;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.blk_error::before {
  content: "⚠️ ";
  margin-right: 8px;
}

.blk_error.show {
  display: block !important;
  animation: slideIn 0.3s ease-out;
}

/* Success messaging styles */
.discount-success {
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  color: #166534;
  padding: 12px 16px;
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.4;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  animation: slideIn 0.3s ease-out;
}

.discount-success::before {
  content: "✅ ";
  margin-right: 8px;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design */
@media (max-width: 600px) {
  .event-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .event-type {
    margin-top: 0.5em;
  }

  .spots-left {
    margin-top: 0.5em;
  }

  .registration-form {
    margin: 1em;
    padding: 1em;
  }

  .event-badge {
    border-radius: 5px;
    font-weight: bold;
    float: unset;
    padding: 0.3em;
    margin-top: 0;
    margin-bottom: 0.5em;
    text-align: center;
  }

  .waitlist-form > sl-input[type=email] {
    min-width: 12em;
    margin-right: 0.25em;
  }
}
