

/* 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;
}

/* Session List Styles */
.event-sessions {
  margin: 1em 0;
}

.session-list {
  list-style: none;
  padding: 0;
  margin: 0.5em 0 0 0;
}

.session-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5em;
  padding: 0.5em 0;
  border-bottom: 1px solid #eee;
}

.session-item:last-child {
  border-bottom: none;
}

.session-datetime {
  font-weight: 500;
}

.session-notes {
  color: #666;
  font-style: italic;
}

.session-status {
  margin-left: auto;
  padding: 0.2em 0.6em;
  border-radius: 12px;
  font-size: 0.85em;
  font-weight: 500;
}

.session-status-available {
  background: #d4edda;
  color: #155724;
}

.session-status-full {
  background: #f8d7da;
  color: #721c24;
}

.session-status-closed {
  background: #e2e3e5;
  color: #383d41;
}

.session-status-past {
  background: #e2e3e5;
  color: #6c757d;
}

.session-item.session-full .session-datetime {
  color: #999;
}

.no-sessions {
  color: #666;
  font-style: italic;
}

/* 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;
  }
}

/* Google Maps Link Styling */
.event-location .map-link {
  color: #007cba;
  text-decoration: underline;
  font-weight: 500;
}

.event-location .map-link:hover {
  color: #005a87;
  text-decoration: underline;
}

.event-location .map-link:before {
  content: "📍 ";
  margin-right: 0.2em;
}

/* ============================================
   EVENT CARDS GRID LAYOUT
   ============================================ */

.events-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5em;
  justify-content: flex-start;
  margin: 2em 0;
}

.event-card-item {
  flex: 0 0 calc(33.333% - 1em);
  max-width: calc(33.333% - 1em);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.event-card-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.event-card-item a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.event-card-image {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.event-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.event-card-item:hover .event-card-image img {
  transform: scale(1.05);
}

.event-card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 0.4em 0.8em;
  border-radius: 20px;
  font-size: 0.75em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.event-card-badge.badge-full {
  background: #DC2626;
  color: white;
}

.event-card-badge.badge-almost-full {
  background: #F59E0B;
  color: white;
}

.event-card-badge.badge-new {
  background: #10B981;
  color: white;
}

.event-card-badge.badge-selling-fast {
  background: #F59E0B;
  color: white;
}

.event-card-info {
  padding: 1.25em;
}

.event-card-info h3 {
  margin: 0 0 0.5em 0;
  font-size: 1.1em;
  font-weight: 600;
  color: #333;
  line-height: 1.3;
}

.event-card-date {
  margin: 0 0 0.5em 0;
  font-size: 0.9em;
  color: #666;
}

.event-card-price {
  margin: 0;
  font-size: 1em;
  font-weight: 600;
  color: #28a745;
}

/* Tablet: 2 columns */
@media (max-width: 992px) {
  .event-card-item {
    flex: 0 0 calc(50% - 0.75em);
    max-width: calc(50% - 0.75em);
  }
}

/* Mobile: 1 column */
@media (max-width: 600px) {
  .events-grid {
    gap: 1em;
  }

  .event-card-item {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* ============================================
   EVENT DETAIL PAGE STYLES
   ============================================ */

.event-detail-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2em 1em;
}

.event-detail-header {
  display: flex;
  gap: 2em;
  margin-bottom: 2.5em;
}

.event-detail-info {
  flex: 1;
}

.event-detail-info h1 {
  margin: 0 0 0.75em 0;
  font-size: 2em;
  color: #333;
  line-height: 1.2;
}

.event-detail-info .event-description {
  margin: 0 0 1.5em 0;
  padding: 0;
  background: none;
  border-left: none;
  line-height: 1.7;
  color: #444;
}

.event-meta {
  display: flex;
  flex-direction: column;
  gap: 0.75em;
  margin-bottom: 1.5em;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.5em;
  color: #555;
}

.meta-item sl-icon {
  font-size: 1.2em;
  color: #007cba;
}

.meta-item a {
  color: #007cba;
  text-decoration: none;
}

.meta-item a:hover {
  text-decoration: underline;
}

.event-detail-info .event-materials {
  margin-top: 1.5em;
}

.event-detail-info .event-materials h3 {
  margin: 0 0 0.5em 0;
  font-size: 1em;
  font-weight: 600;
  color: #333;
}

.event-detail-info .event-materials p {
  margin: 0;
}

.event-detail-image {
  flex: 0 0 400px;
  max-width: 400px;
}

.event-detail-image img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.event-detail-body {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 2em;
  margin-bottom: 2em;
}

.event-sessions-section h2 {
  margin: 0 0 1em 0;
  font-size: 1.3em;
  color: #333;
  border-bottom: 2px solid #007cba;
  padding-bottom: 0.5em;
}

.sessions-list {
  display: flex;
  flex-direction: column;
  gap: 0.75em;
}

.sessions-list .session-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1em 1.25em;
  background: white;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.sessions-list .session-datetime {
  display: flex;
  flex-direction: column;
  gap: 0.25em;
}

.sessions-list .session-date {
  font-weight: 600;
  color: #333;
}

.sessions-list .session-time {
  font-size: 0.9em;
  color: #666;
}

.sessions-list .session-notes {
  flex: 1;
  padding: 0 1em;
  font-size: 0.9em;
  color: #666;
  font-style: italic;
}

.sessions-list .session-status {
  margin-left: 0;
}

.sessions-list .status-available {
  background: #d4edda;
  color: #155724;
  padding: 0.3em 0.8em;
  border-radius: 15px;
  font-size: 0.85em;
  font-weight: 500;
}

.sessions-list .status-limited {
  background: #fff3cd;
  color: #856404;
  padding: 0.3em 0.8em;
  border-radius: 15px;
  font-size: 0.85em;
  font-weight: 500;
}

.sessions-list .status-full {
  background: #f8d7da;
  color: #721c24;
  padding: 0.3em 0.8em;
  border-radius: 15px;
  font-size: 0.85em;
  font-weight: 500;
}

.sessions-list .session-full {
  opacity: 0.7;
}

.event-registration-section {
  margin-top: 2em;
  text-align: center;
}

.registration-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.75em 1.25em;
  border-radius: 8px;
  font-weight: 500;
  margin-bottom: 1em;
}

.registration-status.registration-full {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.registration-status.registration-closed {
  background: #fef3cd;
  color: #856404;
  border: 1px solid #ffc107;
}

.no-registration-needed {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.75em 1.25em;
  background: #d4edda;
  color: #155724;
  border-radius: 8px;
  font-weight: 500;
}

.event-back-link {
  text-align: center;
  margin-top: 1em;
}

/* Mobile styles for detail page */
@media (max-width: 600px) {
  .event-detail-header {
    flex-direction: column;
  }

  .event-detail-image {
    flex: none;
    max-width: 100%;
    order: -1;
    margin-bottom: 1.5em;
  }

  .event-detail-info h1 {
    font-size: 1.5em;
  }

  .event-detail-body {
    padding: 1.25em;
  }

  .sessions-list .session-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75em;
  }

  .sessions-list .session-notes {
    padding: 0;
  }

  .sessions-list .session-status {
    align-self: flex-start;
  }
}

/* ============================================
   ADMIN IMAGE UPLOAD STYLES
   ============================================ */

.image-upload-container {
  display: flex;
  gap: 1.5em;
  align-items: flex-start;
}

.image-preview {
  width: 120px;
  height: 120px;
  border: 2px dashed #ccc;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #f8f9fa;
}

.image-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.image-preview .no-image {
  color: #999;
  font-size: 0.85em;
  text-align: center;
}

.image-controls {
  display: flex;
  flex-direction: column;
  gap: 0.75em;
}

.image-controls input[type="file"] {
  font-size: 0.9em;
}
