/**
 * Maps awards-platform markup to the custom theme (theme-custom.css).
 * Loaded only when UI_THEME=custom. Default theme ignores this file.
 */

[data-ui-theme="custom"] .hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.9)),
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.12), transparent 35%);
  color: #ffffff;
}

[data-ui-theme="custom"] .home-portfolio {
  background: #0f172a;
}

[data-ui-theme="custom"] .home-portfolio-card {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 24px;
  padding: 1.25rem;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
  height: 100%;
}

[data-ui-theme="custom"] .home-stat-row {
  max-width: 720px;
}

[data-ui-theme="custom"] .hero-section .lead,
[data-ui-theme="custom"] .hero-section p {
  color: rgba(255, 255, 255, 0.9);
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

[data-ui-theme="custom"] .home-page .public-navbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  background: transparent !important;
}

[data-ui-theme="custom"] .premium-page .public-navbar,
[data-ui-theme="custom"] .voter-ballot-page .public-navbar,
[data-ui-theme="custom"] .voter-search-page .public-navbar {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.2), transparent 34%),
    linear-gradient(135deg, rgba(13, 110, 253, 0.95), rgba(17, 24, 39, 0.96)) !important;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
}

[data-ui-theme="custom"] .premium-page,
[data-ui-theme="custom"] .voter-ballot-page,
[data-ui-theme="custom"] .voter-search-page {
  background:
    linear-gradient(135deg, rgba(248, 249, 250, 0.95), rgba(230, 240, 255, 0.95));
}

[data-ui-theme="custom"] .public-main .card,
[data-ui-theme="custom"] .premium-page .card,
[data-ui-theme="custom"] .voter-ballot-page .card {
  border-radius: 22px;
  border: none;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

[data-ui-theme="custom"] .public-main h1,
[data-ui-theme="custom"] .page-title {
  font-weight: 800;
  letter-spacing: -0.02em;
}

[data-ui-theme="custom"] .nominee-avatar,
[data-ui-theme="custom"] .nominee-avatar-lg {
  border-radius: 50%;
  border: 4px solid #f1f1f1;
}

[data-ui-theme="custom"] .nominee-avatar-lg {
  width: 120px;
  height: 120px;
}

[data-ui-theme="custom"] .vote-steps {
  background: #eef6ff;
  border: 1px solid #cfe8ff;
  border-radius: 18px;
  padding: 12px 16px;
}

[data-ui-theme="custom"] .vote-steps li.active {
  color: #0d6efd;
}

[data-ui-theme="custom"] .btn-voter-primary,
[data-ui-theme="custom"] .public-main .btn-primary {
  box-shadow: 0 10px 24px rgba(13, 110, 253, 0.25);
}

[data-ui-theme="custom"] .admin-body {
  background: #f1f5f9;
}

[data-ui-theme="custom"] .admin-navbar {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.2), transparent 34%),
    linear-gradient(135deg, rgba(13, 110, 253, 0.95), rgba(17, 24, 39, 0.96)) !important;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
  margin-bottom: 0.5rem;
}

[data-ui-theme="custom"] .admin-main .card {
  border-radius: 22px;
  border: none;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

[data-ui-theme="custom"] .admin-main .table {
  font-size: 0.92rem;
}

[data-ui-theme="custom"] .admin-main h1.mb-1,
[data-ui-theme="custom"] .admin-main h1.fw-bold {
  font-weight: 800;
  letter-spacing: -0.02em;
}

[data-ui-theme="custom"] .auth-page .card {
  border-radius: 24px;
  overflow: hidden;
}

[data-ui-theme="custom"] .auth-page .card-body {
  padding: 2rem !important;
}

[data-ui-theme="custom"] section.bg-light {
  background: #ffffff !important;
}

[data-ui-theme="custom"] .admin-event-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

[data-ui-theme="custom"] .admin-event-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12) !important;
}

/* —— Admin: pro shell for all pages (UI_THEME=custom) —— */
[data-ui-theme="custom"] .admin-main.admin-screen {
  height: calc(100dvh - 56px);
  max-height: calc(100dvh - 56px);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-top: 0.65rem !important;
  padding-bottom: 0.65rem !important;
}

[data-ui-theme="custom"] .admin-screen-inner {
  max-width: 1440px;
  margin: 0 auto;
}

[data-ui-theme="custom"] .admin-screen .admin-page-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
}

[data-ui-theme="custom"] .admin-screen .card:not(.dashboard-main-card):not(.dashboard-side-card) {
  border-radius: 20px;
}

[data-ui-theme="custom"] .admin-screen .card > .card-header {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.15), transparent 32%),
    linear-gradient(135deg, #111827, #1d4ed8);
  color: #fff;
  font-weight: 700;
  border: none;
  border-radius: 20px 20px 0 0;
  padding: 0.65rem 1rem;
}

[data-ui-theme="custom"] .admin-screen .card > .card-header .badge {
  background: rgba(255, 255, 255, 0.2) !important;
  color: #fff;
}

[data-ui-theme="custom"] .admin-screen .card > .card-header a.btn {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
}

[data-ui-theme="custom"] .admin-screen .card > .card-header a.btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

[data-ui-theme="custom"] .admin-screen .table thead.table-light {
  background: #f1f5f9;
}

[data-ui-theme="custom"] .admin-screen .table thead th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  border-bottom-width: 1px;
}

[data-ui-theme="custom"] .admin-screen .table-responsive {
  border-radius: 0 0 20px 20px;
}

[data-ui-theme="custom"] .admin-screen .alert.alert-secondary,
[data-ui-theme="custom"] .admin-screen .alert.ballot-info-alert {
  border-radius: 14px;
  border: 1px solid #cfe8ff;
  background: #eef6ff;
  color: #0f172a;
}

[data-ui-theme="custom"] .admin-screen .row.g-3.mb-4 > [class*="col-"] > .card.h-100 {
  border-radius: 18px;
  border: none;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

[data-ui-theme="custom"] .admin-screen .row.g-3.mb-4 > [class*="col-"] > .card.h-100:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
}

[data-ui-theme="custom"] .admin-screen .row.g-3.mb-4 > [class*="col-"] > .card.h-100 .card-body {
  padding: 0.85rem 1rem;
}

[data-ui-theme="custom"] .admin-screen .row.g-3.mb-4 > [class*="col-"] > .card.h-100 p.text-muted {
  font-size: 0.78rem;
  margin-bottom: 0.25rem !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

[data-ui-theme="custom"] .admin-screen .row.g-3.mb-4 > [class*="col-"] > .card.h-100 h2 {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0;
}

[data-ui-theme="custom"] .admin-screen .form-label {
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

[data-ui-theme="custom"] .admin-screen .form-control,
[data-ui-theme="custom"] .admin-screen .form-select {
  border-radius: 12px;
  border-color: #e2e8f0;
}

[data-ui-theme="custom"] .admin-screen .btn-primary {
  box-shadow: 0 8px 20px rgba(13, 110, 253, 0.22);
}

[data-ui-theme="custom"] .admin-screen .admin-page-topbar h1.text-danger {
  color: #fecaca !important;
}

  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  margin-bottom: 0.5rem;
}

@media (max-width: 767px) {
  [data-ui-theme="custom"] .admin-main.admin-screen {
    height: calc(100dvh - 52px);
    max-height: calc(100dvh - 52px);
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }

  [data-ui-theme="custom"] .admin-screen .admin-page-topbar .admin-page-topbar-actions {
    width: 100%;
  }
}

/* —— Edit event: pro card workspace (UI_THEME=custom) —— */
[data-ui-theme="custom"] .event-edit-hero {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.65), transparent 40%),
    linear-gradient(135deg, #ffffff, #eef6ff);
  border: 1px solid rgba(13, 110, 253, 0.12);
}

[data-ui-theme="custom"] .event-edit-hero-flyer {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

[data-ui-theme="custom"] .event-edit-hero-flyer--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0d6efd, #198754);
  color: #fff;
  font-size: 1.5rem;
}

[data-ui-theme="custom"] .event-edit-shortcut {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 52px;
  padding: 0.55rem 0.75rem;
  border-radius: 16px;
  text-decoration: none;
  color: #fff !important;
  font-weight: 700;
  font-size: 0.82rem;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

[data-ui-theme="custom"] .event-edit-shortcut:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
  color: #fff !important;
}

[data-ui-theme="custom"] .event-edit-shortcut-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

[data-ui-theme="custom"] .event-edit-pro-form .event-edit-card-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
}

[data-ui-theme="custom"] .event-edit-card-icon {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

[data-ui-theme="custom"] .event-edit-pro-form .dashboard-main-card {
  margin-bottom: 0.75rem;
}

[data-ui-theme="custom"] .event-edit-pro-form .dashboard-main-card .card-body textarea {
  min-height: 88px;
}

[data-ui-theme="custom"] .event-edit-save-card {
  position: sticky;
  top: 0.5rem;
  z-index: 4;
  border: 1px solid rgba(13, 110, 253, 0.15);
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

[data-ui-theme="custom"] .event-edit-save-card .btn-primary {
  width: 100%;
}

[data-ui-theme="custom"] .event-edit-save-card .btn-outline-secondary {
  width: 100%;
}

[data-ui-theme="custom"] .event-edit-danger-wrap .card {
  border-radius: 20px;
  overflow: hidden;
}

[data-ui-theme="custom"] .event-edit-pro-form .form-check {
  padding: 0.45rem 0.55rem;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  margin-bottom: 0.45rem;
}

[data-ui-theme="custom"] .event-edit-pro-form .form-check:last-child {
  margin-bottom: 0;
}

@media (min-width: 1200px) {
  [data-ui-theme="custom"] .event-edit-pro-grid > .col-xl-4 {
    position: sticky;
    top: 0.25rem;
    align-self: flex-start;
  }
}

@media (max-width: 1199px) {
  [data-ui-theme="custom"] .event-edit-save-card {
    position: static;
  }

  [data-ui-theme="custom"] .event-edit-save-card .btn-primary,
  [data-ui-theme="custom"] .event-edit-save-card .btn-outline-secondary {
    width: auto;
  }
}

[data-ui-theme="custom"] .voter-ballot-page .public-main.vote-flow-screen,
[data-ui-theme="custom"] .voter-search-page .public-main.vote-flow-screen {
  min-height: calc(100dvh - 56px);
  max-height: calc(100dvh - 56px);
  overflow: hidden;
  padding: 0 !important;
}

[data-ui-theme="custom"] .vote-flow-inner {
  display: flex;
  flex-direction: column;
  height: calc(100dvh - 56px);
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.5rem 1rem 0.65rem;
  min-height: 0;
}

[data-ui-theme="custom"] .vote-flow-inner--center {
  justify-content: center;
  align-items: center;
}

[data-ui-theme="custom"] .vote-flow-screen .vote-steps {
  margin-bottom: 0.5rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.72rem;
  gap: 0.35rem 0.75rem;
  flex-shrink: 0;
}

[data-ui-theme="custom"] .vote-flow-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-shrink: 0;
  color: #fff;
  padding: 0.65rem 1rem;
  margin-bottom: 0.5rem;
  border-radius: 16px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.2), transparent 34%),
    linear-gradient(135deg, rgba(13, 110, 253, 0.96), rgba(17, 24, 39, 0.98));
}

[data-ui-theme="custom"] .vote-flow-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

[data-ui-theme="custom"] .vote-flow-sub {
  font-size: 0.8rem;
  opacity: 0.88;
}

[data-ui-theme="custom"] .vote-flow-pill {
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  white-space: nowrap;
  flex-shrink: 0;
}

[data-ui-theme="custom"] .vote-flow-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(160px, 220px) 1fr;
  gap: 0.65rem;
}

[data-ui-theme="custom"] .vote-flow-nominee {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.65rem;
  min-height: 0;
  overflow: hidden;
}

[data-ui-theme="custom"] .vote-flow-photo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #f1f5f9;
  flex-shrink: 0;
}

[data-ui-theme="custom"] .vote-flow-photo--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  color: #64748b;
  font-weight: 700;
}

[data-ui-theme="custom"] .vote-flow-nominee-meta {
  margin-top: 0.35rem;
  font-size: 0.85rem;
  line-height: 1.3;
}

[data-ui-theme="custom"] .vote-flow-code {
  padding: 0.35rem 0.5rem;
  text-align: center;
}

[data-ui-theme="custom"] .vote-flow-code code {
  font-size: 0.95rem;
  font-weight: 700;
}

[data-ui-theme="custom"] .vote-flow-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

[data-ui-theme="custom"] .vote-flow-panel-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
  color: #fff;
  padding: 0.5rem 0.85rem;
  font-weight: 700;
  font-size: 0.9rem;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 30%),
    linear-gradient(135deg, #111827, #1d4ed8);
}

[data-ui-theme="custom"] .vote-flow-panel-head .position-number {
  width: 28px;
  height: 28px;
  font-size: 0.85rem;
  border-radius: 10px;
  margin: 0;
}

[data-ui-theme="custom"] .vote-flow-panel-body {
  flex: 1;
  min-height: 0;
  padding: 0.65rem 0.85rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

[data-ui-theme="custom"] .vote-flow-packages {
  max-height: 4.5rem;
  overflow-y: auto;
}

[data-ui-theme="custom"] .vote-flow-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1rem;
  font-size: 0.88rem;
}

[data-ui-theme="custom"] .vote-flow-summary-wide {
  grid-column: 1 / -1;
}

[data-ui-theme="custom"] .vote-flow-foot {
  flex-shrink: 0;
  margin-top: 0.4rem;
}

[data-ui-theme="custom"] .vote-flow-foot .public-action-row {
  gap: 0.35rem;
}

[data-ui-theme="custom"] .vote-flow-foot .btn {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
}

[data-ui-theme="custom"] .vote-flow-entry-card {
  width: 100%;
  max-width: 420px;
  overflow: hidden;
}

[data-ui-theme="custom"] .vote-flow-entry-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #fff;
  padding: 0.85rem 1rem;
  background: linear-gradient(135deg, #0d6efd, #198754);
}

[data-ui-theme="custom"] .vote-flow-entry-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

[data-ui-theme="custom"] .vote-flow-entry-body {
  padding: 0.85rem 1rem 1rem;
}

[data-ui-theme="custom"] .vote-flow-code-input input {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

@media (max-width: 767px) {
  [data-ui-theme="custom"] .vote-flow-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  [data-ui-theme="custom"] .vote-flow-nominee {
    flex-direction: row;
    text-align: left;
    gap: 0.65rem;
    padding: 0.5rem 0.65rem;
  }

  [data-ui-theme="custom"] .vote-flow-nominee-meta {
    margin-top: 0;
    flex: 1;
  }

  [data-ui-theme="custom"] .vote-flow-photo {
    width: 56px;
    height: 56px;
  }

  [data-ui-theme="custom"] .vote-flow-inner {
    padding: 0.4rem 0.65rem 0.5rem;
  }
}

@media (max-height: 640px) {
  [data-ui-theme="custom"] .vote-flow-inner {
    height: calc(100dvh - 52px);
  }

  [data-ui-theme="custom"] .vote-flow-photo {
    width: 56px;
    height: 56px;
  }

  [data-ui-theme="custom"] .vote-flow-panel-body {
    justify-content: flex-start;
    overflow-y: auto;
  }
}
