/* Damco palette + component overrides on top of Tailwind. */

:root {
  --damco-red: #E32200;
  --burgundy:  #94122C;
  --burgundy-dark: #100D08;
  --plum:      #330033;
  --purple:    #721562;
  --orange:    #CA3F16;
  --yellow:    #FF9408;
  --cream:     #FBEEDB;
}

/* Buttons */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.625rem 1rem;
  font-weight: 600;
  border-radius: 0.5rem;
  background: var(--damco-red);
  color: #fff;
  border: 1px solid transparent;
  transition: background 150ms ease, transform 80ms ease, box-shadow 150ms ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.btn-primary:hover { background: #c61d00; }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.5rem 0.875rem;
  font-weight: 600;
  border-radius: 0.5rem;
  background: var(--burgundy);
  color: #fff;
  border: 1px solid transparent;
  transition: background 150ms ease;
}
.btn-secondary:hover { background: var(--purple); }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.5rem 0.875rem;
  font-weight: 600;
  border-radius: 0.5rem;
  background: transparent;
  color: var(--burgundy);
  border: 1px solid var(--cream);
  transition: background 150ms ease, color 150ms ease;
}
.btn-ghost:hover { background: var(--cream); color: var(--burgundy-dark); }

.btn-danger {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.5rem 0.875rem;
  font-weight: 600;
  border-radius: 0.5rem;
  background: #b91c1c;
  color: #fff;
  transition: background 150ms ease;
}
.btn-danger:hover { background: #991b1b; }

.btn-success {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.5rem 0.875rem;
  font-weight: 600;
  border-radius: 0.5rem;
  background: #15803d;
  color: #fff;
  transition: background 150ms ease;
}
.btn-success:hover { background: #166534; }

/* Forms */
.form-input, .form-select, .form-textarea {
  display: block; width: 100%;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid #e5d6c0;
  background: #fff;
  color: var(--burgundy-dark);
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--burgundy);
  box-shadow: 0 0 0 3px rgba(148, 18, 44, 0.18);
}

/* Cards */
.card {
  background: #fff;
  border: 1px solid var(--cream);
  border-radius: 0.75rem;
  box-shadow: 0 1px 2px rgba(16,13,8,0.06), 0 4px 12px rgba(16,13,8,0.06);
}
.card-header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--cream); }
.card-body   { padding: 1rem 1.25rem; }

/* Badges */
.badge { display: inline-flex; align-items: center; padding: 2px 8px;
         border-radius: 999px; font-size: 0.75rem; font-weight: 600; line-height: 1.2; }
.badge-rsvp     { background: var(--burgundy); color: #fff; }
.badge-walkin   { background: var(--orange); color: #fff; }
.badge-inline   { background: var(--purple); color: #fff; }
.badge-checked  { background: #15803d; color: #fff; }
.badge-given    { background: #15803d; color: #fff; }
.badge-declined { background: #6b7280; color: #fff; }
.badge-closed   { background: var(--plum); color: var(--cream); }
.badge-active   { background: var(--damco-red); color: #fff; }
.badge-draft    { background: #d4a574; color: #5b3a07; }

/* Layout helpers */
.divide-cream > * + * { border-top: 1px solid var(--cream); }
.text-burgundy   { color: var(--burgundy); }
.text-burgundy-dark { color: var(--burgundy-dark); }
.text-plum       { color: var(--plum); }
.bg-cream        { background: var(--cream); }
.border-cream    { border-color: var(--cream); }

/* Tables */
.tbl { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.tbl th { text-align: left; padding: 0.625rem 0.75rem; background: var(--cream);
          color: var(--burgundy-dark); font-weight: 600; font-size: 0.75rem;
          letter-spacing: 0.04em; text-transform: uppercase; }
.tbl td { padding: 0.625rem 0.75rem; border-top: 1px solid var(--cream); vertical-align: top; }
.tbl tr:hover td { background: rgba(251,238,219,0.4); }

/* Kiosk-specific (large tap targets) */
.kiosk-row {
  display: flex; align-items: center; gap: 0.875rem;
  padding: 0.875rem 1rem;
  border-radius: 0.75rem;
  background: #fff;
  border: 1px solid var(--cream);
  transition: transform 80ms ease, border-color 150ms ease, box-shadow 150ms ease;
  cursor: pointer;
  min-height: 64px;
}
.kiosk-row:hover { border-color: var(--burgundy); box-shadow: 0 4px 14px rgba(148,18,44,0.10); }
.kiosk-row[data-locked="1"] { opacity: 0.55; cursor: not-allowed; }
.kiosk-row[data-locked="1"]:hover { transform: none; border-color: var(--cream); box-shadow: none; }

/* Skeleton */
@keyframes pulse-bg { 0%,100% { background-color: rgba(148,18,44,0.06); } 50% { background-color: rgba(148,18,44,0.15); } }
.skeleton { animation: pulse-bg 1.4s ease-in-out infinite; border-radius: 0.5rem; }

/* Responsive table → cards on small screens */
@media (max-width: 640px) {
  .tbl-cards thead { display: none; }
  .tbl-cards, .tbl-cards tbody, .tbl-cards tr, .tbl-cards td { display: block; width: 100%; }
  .tbl-cards tr { background: #fff; border: 1px solid var(--cream); border-radius: 0.75rem; margin-bottom: 0.75rem; padding: 0.5rem 0.75rem; }
  .tbl-cards td { border: 0; padding: 0.375rem 0; }
  .tbl-cards td::before { content: attr(data-label); display: block; font-size: 0.75rem; text-transform: uppercase;
                          letter-spacing: 0.04em; color: var(--burgundy); font-weight: 600; }
}
