@import url("open-iconic/font/css/open-iconic-bootstrap.min.css");

html,
body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

h1:focus {
  outline: none;
}

a,
.btn-link {
  color: #0071c1;
}

.btn-primary {
  color: #fff;
  background-color: #1b6ec2;
  border-color: #1861ac;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
  padding-top: 1.1rem;
}

.valid.modified:not([type="checkbox"]) {
  outline: 1px solid #26b050;
}

.invalid {
  outline: 1px solid red;
}

.validation-message {
  color: red;
}

#blazor-error-ui {
  background: lightyellow;
  bottom: 0;
  box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
  display: none;
  left: 0;
  padding: 0.6rem 1.25rem 0.7rem 1.25rem;
  position: fixed;
  width: 100%;
  z-index: 1000;
}

#blazor-error-ui .dismiss {
  cursor: pointer;
  position: absolute;
  right: 0.75rem;
  top: 0.5rem;
}

.blazor-error-boundary {
  background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4N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Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=)
      no-repeat 1rem/1.8rem,
    #b32121;
  padding: 1rem 1rem 1rem 3.7rem;
  color: white;
}

.blazor-error-boundary::after {
  content: "An error has occurred.";
}

/* Theme Support */
.light-theme {
  --bs-body-bg: #ffffff;
  --bs-body-color: #212529;
}

.dark-theme {
  --bs-body-bg: #212529;
  --bs-body-color: #ffffff;
}

/* Ensure theme transitions are smooth */
html,
body {
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Dark theme specific styles */
.dark-theme .navbar-dark {
  background-color: #1a1a1a !important;
}

.dark-theme .navbar {
  background-color: #484e53 !important;
}

.dark-theme .navbar-brand,
.dark-theme .nav-link {
  color: #333333 !important;
  background-color: #484e53 !important;
}

/* Set default navbar styling */
.navbar {
  background-color: #484e53 !important;
  border-color: #ffffff !important;
}

.navbar-brand,
.nav-link {
  color: #ffffff !important;
  background-color: #484e53 !important;
}

.navbar-toggler {
  border-color: #ffffff;
  background-color: #484e53 !important;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

.dark-theme .card {
  background-color: #2d2d2d;
  border-color: #444;
}

.dark-theme .table {
  --bs-table-bg: #2d2d2d;
  --bs-table-color: #ffffff;
}

.dark-theme .btn-outline-secondary {
  --bs-btn-color: #ffffff;
  --bs-btn-border-color: #6c757d;
}

.dark-theme .form-control {
  background-color: #2d2d2d;
  border-color: #444;
  color: #ffffff;
}

.dark-theme .form-select {
  background-color: #2d2d2d;
  border-color: #444;
  color: #ffffff;
}

/* Dark mode for Stripe payment element */
[data-bs-theme="dark"] #payment-element {
  background-color: #2d2d2d !important;
  border-color: #444 !important;
  color: #ffffff !important;
}

[data-bs-theme="dark"] .bg-light {
  background-color: #2d2d2d !important;
  color: #ffffff !important;
}

/* Ensure text in bg-light containers is visible */
[data-bs-theme="dark"] .bg-light small,
[data-bs-theme="dark"] .bg-light .text-muted {
  color: #adb5bd !important;
}

[data-bs-theme="dark"] .text-muted {
  color: #adb5bd !important;
}

[data-bs-theme="dark"] .card {
  background-color: #1a1a1a;
  border-color: #444;
}

[data-bs-theme="dark"] .card-header {
  background-color: #2d2d2d;
  border-color: #444;
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
  background-color: #2d2d2d;
  border-color: #444;
  color: #ffffff;
}

[data-bs-theme="dark"] .form-check-input {
  background-color: #2d2d2d;
  border-color: #444;
}

[data-bs-theme="dark"] .alert-danger {
  background-color: #842029;
  border-color: #842029;
  color: #ea868f;
}

[data-bs-theme="dark"] .alert-success {
  background-color: #0f5132;
  border-color: #0f5132;
  color: #75b798;
}

[data-bs-theme="dark"] .alert-info {
  background-color: #055160;
  border-color: #055160;
  color: #6edff6;
}

/* Form labels in dark mode */
[data-bs-theme="dark"] .form-label {
  color: #ffffff;
}

/* Tables in dark mode */
[data-bs-theme="dark"] .table {
  --bs-table-bg: #1a1a1a;
  --bs-table-striped-bg: #2d2d2d;
  --bs-table-color: #ffffff;
  --bs-table-border-color: #444;
  color: #ffffff;
}

[data-bs-theme="dark"] .table-hover tbody tr:hover {
  background-color: #2d2d2d;
  color: #ffffff;
}

/* Ensure all text in cards is visible */
[data-bs-theme="dark"] .card-body,
[data-bs-theme="dark"] .card-title,
[data-bs-theme="dark"] .card-text {
  color: #ffffff;
}

/* Loading spinner text */
[data-bs-theme="dark"] .spinner-border + span {
  color: #ffffff;
}

/* Headings in dark mode */
[data-bs-theme="dark"] h1,
[data-bs-theme="dark"] h2,
[data-bs-theme="dark"] h3,
[data-bs-theme="dark"] h4,
[data-bs-theme="dark"] h5,
[data-bs-theme="dark"] h6 {
  color: #ffffff;
}

/* Links in dark mode */
[data-bs-theme="dark"] a {
  color: #edeef0;
}

[data-bs-theme="dark"] a:hover {
  color: #9ec5fe;
}

/* Badges remain visible with their original colors */
[data-bs-theme="dark"] .badge {
  color: #ffffff;
}

/* Table data visibility */
[data-bs-theme="dark"] td,
[data-bs-theme="dark"] th {
  color: #ffffff;
}

/* Modal styles for dark mode */
[data-bs-theme="dark"] .modal-content {
  background-color: #212529;
  color: #ffffff;
  border: 1px solid #495057;
}

[data-bs-theme="dark"] .modal-header {
  border-bottom-color: #495057;
}

[data-bs-theme="dark"] .modal-footer {
  border-top-color: #495057;
}

[data-bs-theme="dark"] .modal-body {
  color: #ffffff;
}

[data-bs-theme="dark"] .modal-body p,
[data-bs-theme="dark"] .modal-body .mb-0 {
  color: #e9ecef;
}

[data-bs-theme="dark"] .modal-title {
  color: #ffffff;
}

[data-bs-theme="dark"] .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

/* Button groups in dark mode */
[data-bs-theme="dark"] .btn-outline-primary {
  color: #6ea8fe;
  border-color: #6ea8fe;
}

[data-bs-theme="dark"] .btn-outline-primary:hover {
  background-color: #6ea8fe;
  color: #000;
}

[data-bs-theme="dark"] .btn-outline-secondary {
  color: #adb5bd;
  border-color: #6c757d;
}

[data-bs-theme="dark"] .btn-outline-secondary:hover {
  background-color: #6c757d;
  color: #fff;
}

/* Add this to ensure all links in the nav menu are white */
.nav-scrollable a {
  color: white !important;
}

/* Event card styles */
.card {
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important;
}

/* Event grid responsive spacing */
.g-3 {
  --bs-gutter-x: 1rem;
  --bs-gutter-y: 1rem;
}

/* Modal backdrop */
.modal.show {
  display: block;
  background-color: rgba(0, 0, 0, 0.5);
}

/* Event details modal */
.modal-body h6.text-muted {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.modal-body .row > div {
  padding: 0.75rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

[data-bs-theme="dark"] .modal-body .row > div {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.modal-body .row > div:last-child {
  border-bottom: none;
}

/* Event card compact info */
.card-body small {
  display: block;
  line-height: 1.8;
}

/* Info button styling */
.btn-outline-info {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

/* ============================================
   EVENT FLYER CARD STYLES
   ============================================ */

.event-flyer-card {
  background: linear-gradient(to bottom, #ffffff 0%, #f8f9fa 100%);
  border: 4px solid #dc3545;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15), 0 4px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  page-break-inside: avoid;
  text-align: center;
}

.event-flyer-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2), 0 6px 12px rgba(0, 0, 0, 0.15);
  border-color: #bd2130;
}

/* Flyer Header with Logo */
.flyer-header {
  background: white;
  padding: 20px;
  text-align: center;
  border-bottom: 4px solid #dc3545;
}

.flyer-logo-top {
  max-width: 50%;
  height: auto;
  object-fit: contain;
}

/* Status Ribbon */
.flyer-status-ribbon {
  position: absolute;
  top: 15px;
  right: -35px;
  padding: 8px 40px;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transform: rotate(45deg);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 10;
}

.ribbon-upcoming {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
}

.ribbon-ongoing {
  background: linear-gradient(135deg, #27ae60, #229954);
  color: white;
}

.ribbon-completed {
  background: linear-gradient(135deg, #95a5a6, #7f8c8d);
  color: white;
}

.ribbon-cancelled {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
}

/* Event Type Badge - Upper Left Corner */
.flyer-type-badge-corner {
  position: absolute;
  top: 15px;
  left: 15px;
  background: linear-gradient(135deg, #f39c12, #e67e22);
  color: white;
  padding: 8px 18px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
  z-index: 15;
}

/* Event Title */
.flyer-title {
  background: linear-gradient(135deg, #1a252f 0%, #2c3e50 100%);
  color: white;
  padding: 25px 20px;
  text-align: center;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flyer-title h3 {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1.3;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Event Details Section */
.flyer-details {
  padding: 25px 20px;
  background: white;
  flex-grow: 1;
  text-align: center;
}

.flyer-detail-item {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
  height: 100%;
}

.flyer-detail-item:last-of-type {
  border-bottom: none;
}

.flyer-details .row .col-md-6 .flyer-detail-item {
  border: 2px solid #ecf0f1;
  border-radius: 8px;
  padding: 15px;
  background: #f8f9fa;
  height: 100%;
}

.detail-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #dc3545;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
}

.detail-content {
  font-size: 0.95rem;
  line-height: 1.6;
  text-align: center;
}

.detail-content strong {
  color: #2c3e50;
  font-weight: 700;
  display: block;
  font-size: 1.1rem;
}

.detail-time {
  color: #e74c3c;
  font-weight: 700;
  font-size: 1.15rem;
  margin-top: 5px;
}

.date-line-1,
.date-line-3 {
  color: #2c3e50;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.4;
}

.date-line-2 {
  color: #7f8c8d;
  font-size: 0.9rem;
  font-style: italic;
  margin: 5px 0;
  text-align: center;
}

.detail-subtext {
  color: #7f8c8d;
  font-size: 0.9rem;
  margin-top: 4px;
}

.cost-free {
  color: #27ae60;
  font-size: 1.3rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 800;
}

.cost-paid {
  color: #e74c3c;
  font-size: 1.4rem;
  font-weight: 800;
}

.waitlist-notice {
  background: #fff3cd;
  color: #856404;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.85rem;
  margin-top: 8px;
  display: inline-block;
  font-weight: 600;
}

/* Description */
.flyer-description {
  background: #f8f9fa;
  border: 2px solid #3498db;
  padding: 15px;
  margin-top: 10px;
  font-size: 0.95rem;
  line-height: 1.7;
  color: #34495e;
  border-radius: 6px;
  text-align: left;
}

.virtual-link {
  display: inline-block;
  background: #3498db;
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  margin-top: 5px;
  transition: background 0.3s ease;
}

.virtual-link:hover {
  background: #2980b9;
  color: white;
}

/* Flyer Footer */
.flyer-footer {
  background: white;
  padding: 20px;
  text-align: center;
  border-top: 4px solid #dc3545;
}

.flyer-logo-bottom {
  max-width: 26%;
  height: auto;
  object-fit: contain;
}

.flyer-copyright {
  margin-top: 15px;
  font-size: 0.85rem;
  color: #6c757d;
  text-align: center;
}

/* Combined Actions Section */
.flyer-actions-section {
  background: linear-gradient(to bottom, #ffffff, #f8f9fa);
  padding: 15px 20px;
  text-align: center;
  border-top: 2px solid #ecf0f1;
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
}

.btn-register {
  flex: 1;
  max-width: 200px;
  padding: 10px 16px;
  background: linear-gradient(135deg, #27ae60, #229954);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.btn-register:hover {
  background: linear-gradient(135deg, #229954, #1e8449);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(39, 174, 96, 0.4);
}

.btn-share {
  flex: 1;
  max-width: 200px;
  padding: 10px 16px;
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(52, 152, 219, 0.3);
}

.btn-share:hover {
  background: linear-gradient(135deg, #2980b9, #21618c);
  transform: translateY(-2px);
  box-shadow: 0 5px 14px rgba(52, 152, 219, 0.4);
}

/* Print Styles for Flyers */
@media print {
  .event-flyer-card {
    page-break-inside: avoid;
    box-shadow: none;
    border: 3px solid #dc3545;
  }

  .flyer-share-section {
    display: none;
  }

  .event-flyer-card:hover {
    transform: none;
  }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .flyer-title h3 {
    font-size: 1.25rem;
  }

  .flyer-type-badge {
    top: 70px;
  }
}
