@import url('https://fonts.googleapis.com/css2?family=Hind:wght@400;500;600;700&family=Poppins:wght@400;500;600;700&display=swap');

:root {
  --primary-red: #991b1b;
  --primary-dark: #7f1d1d;
  --accent-gold: #b45309;
  --text-main: #0f172a;
  --text-muted: #475569;
  --card-radius: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Hind', 'Poppins', sans-serif;
}

body {
  background: linear-gradient(135deg, #fef3c7 0%, #ffedd5 50%, #fee2e2 100%);
  color: var(--text-main);
  min-height: 100vh;
  padding: 16px 10px 40px;
  display: flex;
  justify-content: center;
}

.main-wrapper {
  width: 100%;
  max-width: 760px;
}

/* Header */
.event-banner-head {
  text-align: center;
  background: linear-gradient(135deg, #c2410c, #b91c1c);
  color: #fff;
  padding: 22px 16px;
  border-radius: var(--card-radius);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  margin-bottom: 18px;
  border: 2px solid #fed7aa;
}

.tag-badge {
  display: inline-block;
  background: #ffffff;
  color: #b91c1c;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 8px;
}

.main-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #fde047;
  text-shadow: 1px 2px 4px rgba(0,0,0,0.4);
}

.sub-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 4px 0;
  color: #fff;
}

.slogan {
  font-style: italic;
  font-weight: 600;
  font-size: 0.95rem;
  color: #fef08a;
}

/* General Cards */
.card {
  background: #ffffff;
  padding: 22px;
  border-radius: var(--card-radius);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #fed7aa;
  margin-bottom: 18px;
  animation: fadeIn 0.3s ease-in-out;
}

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

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}

.info-box {
  background: #fff7ed;
  border: 1px solid #fdba74;
  padding: 12px 14px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.info-box.full-width {
  grid-column: span 2;
}

.info-box .icon {
  font-size: 1.8rem;
}

.info-box strong {
  display: block;
  font-size: 0.88rem;
  color: #9a3412;
}

.info-box p {
  font-size: 0.95rem;
  font-weight: 600;
}

.rules-block {
  background: #f8fafc;
  border-left: 4px solid var(--primary-red);
  padding: 14px 18px;
  border-radius: 6px;
  margin-bottom: 20px;
}

.rules-block h3 {
  font-size: 1rem;
  color: var(--primary-red);
  margin-bottom: 8px;
}

.rules-block ul {
  padding-left: 20px;
}

.rules-block li {
  font-size: 0.92rem;
  margin-bottom: 6px;
  color: var(--text-muted);
}

/* Form Styles */
.form-header {
  text-align: center;
  margin-bottom: 18px;
}

.form-header h3 {
  font-size: 1.35rem;
  color: var(--primary-dark);
}

.form-header p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.input-field {
  margin-bottom: 15px;
}

.input-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 5px;
  color: #334155;
}

input[type="text"],
input[type="tel"],
input[type="number"],
.select-field {
  width: 100%;
  padding: 11px 14px;
  font-size: 0.95rem;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  outline: none;
  background-color: #fff;
  transition: all 0.2s ease;
}

.select-field {
  cursor: pointer;
}

input:focus,
.select-field:focus {
  border-color: var(--primary-red);
  box-shadow: 0 0 0 3px rgba(153, 27, 27, 0.15);
}

/* Action Buttons */
.action-btn-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.btn {
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-align: center;
}

.btn-primary {
  background: var(--primary-red);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  background: #e2e8f0;
  color: #1e293b;
}

.btn-secondary:hover {
  background: #cbd5e1;
}

.btn-outline {
  background: #fff;
  color: var(--primary-red);
  border: 2px solid var(--primary-red);
}

.btn-outline:hover {
  background: #fee2e2;
}

.btn-download-gold {
  background: #b45309;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(180, 83, 9, 0.35);
}

.btn-download-gold:hover {
  background: #92400e;
}

.loading-spinner, .error-msg {
  text-align: center;
  margin-top: 12px;
  font-size: 0.9rem;
  font-weight: 600;
}

.loading-spinner {
  color: var(--primary-red);
}

.error-msg {
  color: #dc2626;
}

/* ========================================================
   EXACT A4 PROPORTIONED SCREEN & PDF DISPLAY
======================================================== */
.a4-screen-wrapper {
  display: flex;
  justify-content: center;
  background: #334155;
  padding: 14px;
  border-radius: 10px;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.3);
  overflow-x: auto;
}

/* 210mm x 297mm proportion: 720px width & 1018px height */
.a4-document {
  width: 100%;
  max-width: 720px;
  min-height: 1018px;
  background: #ffffff;
  padding: 20px;
  box-sizing: border-box;
  box-shadow: 0 10px 25px rgba(0,0,0,0.35);
  display: flex;
  flex-direction: column;
}

.slip-inner-frame {
  border: 2px solid #991b1b;
  padding: 18px 20px;
  background: #ffffff;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Slip Header */
.a4-header {
  text-align: center;
  border-bottom: 2px solid #991b1b;
  padding-bottom: 10px;
}

.badge-tag {
  display: inline-block;
  background: #991b1b;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  padding: 2px 10px;
  border-radius: 3px;
  margin-bottom: 6px;
}

.slip-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: #991b1b;
  line-height: 1.2;
}

.slip-subtitle {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin: 3px 0;
}

.slip-slogan {
  font-size: 0.92rem;
  font-weight: 600;
  color: #b45309;
  font-style: italic;
  margin-bottom: 4px;
}

.slip-org-info {
  font-size: 0.84rem;
  color: #334155;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Registration Meta Box */
.slip-meta-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fef2f2;
  border: 1px solid #fecaca;
  padding: 8px 14px;
  margin: 12px 0 14px 0;
  border-radius: 4px;
}

.meta-label {
  display: block;
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 700;
  text-transform: uppercase;
}

.meta-value {
  font-size: 1.2rem;
  font-weight: 800;
  color: #991b1b;
  letter-spacing: 0.5px;
}

.text-right {
  text-align: right;
}

/* Headings */
.section-heading {
  font-size: 0.88rem;
  font-weight: 700;
  color: #991b1b;
  text-transform: uppercase;
  margin: 12px 0 6px 0;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 3px;
}

/* Table Details */
.slip-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 12px;
}

.slip-table td {
  border: 1px solid #cbd5e1;
  padding: 8px 10px;
  font-size: 0.88rem;
  vertical-align: middle;
}

.slip-table .col-lbl {
  background: #f8fafc;
  color: #475569;
  width: 25%;
  font-weight: 600;
  line-height: 1.2;
}

.slip-table .col-lbl small {
  font-size: 0.74rem;
  color: #64748b;
  font-weight: normal;
}

.slip-table .col-val {
  color: #0f172a;
  width: 25%;
  font-weight: 500;
}

.slip-table .col-val-bold {
  color: #0f172a;
  width: 25%;
  font-weight: 700;
}

.badge-status {
  display: inline-block;
  background: #dcfce7;
  color: #15803d;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid #bbf7d0;
}

/* Venue Section */
.venue-strip {
  background: #fffbeb;
  border: 1px solid #fef3c7;
  border-left: 4px solid #f59e0b;
  padding: 10px 14px;
  border-radius: 4px;
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.venue-cell {
  display: flex;
  gap: 10px;
  align-items: center;
}

.venue-cell .icon {
  font-size: 1.2rem;
}

.venue-cell strong {
  font-size: 0.82rem;
  color: #92400e;
  display: block;
}

.venue-cell p {
  font-size: 0.88rem;
  font-weight: 600;
  color: #0f172a;
}

/* Instructions */
.instructions {
  padding-left: 20px;
  margin-bottom: 20px;
}

.instructions li {
  font-size: 0.82rem;
  color: #475569;
  margin-bottom: 5px;
  line-height: 1.35;
}

/* Slip Footnote */
.slip-footnote {
  border-top: 1px dashed #cbd5e1;
  padding-top: 10px;
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: #64748b;
}

.valid-seal {
  font-weight: 700;
  color: #15803d;
  font-size: 0.72rem;
  border: 1px solid #86efac;
  background: #f0fdf4;
  padding: 2px 8px;
  border-radius: 3px;
}

/* Actions Placed BELOW the Slip */
.slip-bottom-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}

/* External Poster */
.poster-container {
  width: 100%;
  margin-top: 16px;
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  border: 2px solid #fed7aa;
  background: #fff;
}

.event-poster-img {
  width: 100%;
  height: auto;
  display: block;
}

/* Footer (Homepage Only) */
.creator-footer {
  margin-top: 25px;
  text-align: center;
  display: flex;
  justify-content: center;
}

.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  padding: 6px 14px;
  border-radius: 30px;
  border: 1px solid #fed7aa;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  font-size: 0.82rem;
  color: #4b5563;
}

.creator-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid #ea580c;
}

.footer-badge strong {
  color: #c2410c;
}

/* Responsiveness */
@media (max-width: 600px) {
  .info-grid, .input-grid, .venue-strip {
    grid-template-columns: 1fr;
  }
  .info-box.full-width {
    grid-column: span 1;
  }
  .a4-screen-wrapper {
    padding: 6px;
  }
  .a4-document {
    padding: 12px;
  }
  .slip-inner-frame {
    padding: 12px;
  }
  .slip-table td {
    padding: 6px 8px;
    font-size: 0.82rem;
  }
}

@media print {
  body {
    background: #fff !important;
    padding: 0 !important;
  }
  .no-print {
    display: none !important;
  }
  .a4-screen-wrapper {
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
  }
  .a4-document {
    box-shadow: none !important;
    padding: 0 !important;
    max-width: 100% !important;
  }
}
