/**
 * High Velocity Labs Component Styles - Julie & Tom
 * Conforms to Modern Web Guidance for dialogs, cards, badges, and controls.
 */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary {
  background: var(--burgundy);
  color: #ffffff;
  border-color: var(--burgundy-dark);
}

.btn-primary:hover {
  background: var(--burgundy-dark);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--burgundy-glow);
}

.btn-outline {
  background: transparent;
  color: var(--burgundy);
  border-color: var(--burgundy);
}

.btn-outline:hover {
  background: var(--burgundy);
  color: #ffffff;
}

.btn-secondary {
  background: var(--light-blue-subtle);
  color: var(--dark-brown);
  border-color: var(--light-blue-border);
}

.btn-secondary:hover {
  background: var(--light-blue);
  color: var(--dark-brown);
}

.btn-sm {
  padding: 4px 12px;
  font-size: 0.82rem;
  border-radius: var(--radius-xs);
}

/* Category Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: capitalize;
}

.badge-milestone { background: #ffe7cb; color: #8a4100; border: 1px solid #f9cf9f; }
.badge-wedding   { background: #fbe0e6; color: #8c1028; border: 1px solid #f3b5c4; }
.badge-dating    { background: #fdedf0; color: #b82540; border: 1px solid #f9cad4; }
.badge-travel    { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }
.badge-family    { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
.badge-career    { background: #ede7f6; color: #512da8; border: 1px solid #d1c4e9; }
.badge-fun       { background: #fff8e1; color: #f57f17; border: 1px solid #ffecb3; }
.badge-kids      { background: #fce4ec; color: #c2185b; border: 1px solid #f8bbd0; }
.badge-home      { background: #e0f7fa; color: #00838f; border: 1px solid #b2ebf2; }

/* Tag Pill */
.tag-pill {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--text-muted);
  background: rgba(70, 19, 0, 0.05);
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(70, 19, 0, 0.1);
}

/* Reusable Cards */
.card {
  background: var(--cream-card);
  border: 1px solid rgba(164, 32, 56, 0.2);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-title {
  font-family: var(--font-serif-display);
  color: var(--burgundy);
  font-size: 1.35rem;
  margin-bottom: 8px;
}

/* Modern Accessible Dialog (Modern Web Guidance Compliant) */
dialog.modal-dialog {
  border: none;
  background: transparent;
  padding: 0;
  max-width: 680px;
  width: 90vw;
  margin: auto;
  border-radius: var(--radius-lg);
  overflow: visible;
}

dialog:modal {
  /* MANDATORY: Prevent scroll gestures inside the modal from chaining to underlying page */
  overscroll-behavior: contain;
}

dialog::backdrop {
  /* MANDATORY: overflow: hidden turns backdrop into scroll container for overscroll-behavior */
  overflow: hidden;
  overscroll-behavior: contain;
  background: rgba(44, 14, 3, 0.72);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.modal-content {
  background: var(--cream-card);
  border: 3px solid var(--burgundy);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), 0 0 0 4px var(--cream);
  padding: 32px 28px;
  position: relative;
  max-height: 85vh;
  overflow-y: auto;
  color: var(--text-primary);
}

.modal-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--cream);
  border: 1px solid var(--burgundy);
  color: var(--burgundy);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  line-height: 1;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: var(--burgundy);
  color: #fff;
  transform: rotate(90deg);
}

/* Form Inputs */
.form-group {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--dark-brown);
}

.form-input, .form-textarea, .form-select {
  padding: 10px 14px;
  border: 1px solid #d4c0a5;
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--burgundy);
  box-shadow: 0 0 0 3px var(--burgundy-subtle);
}
/* Nostalgic Sims 2 Splash Screen */
.sims-splash-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 8, 0, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  animation: fadeIn 0.25s ease-out;
}
.sims-splash-modal {
  background: var(--cream-card);
  border: 3px double var(--burgundy);
  border-radius: var(--radius-md);
  max-width: 680px;
  width: 100%;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  text-align: center;
}
.sims-splash-header {
  background: linear-gradient(135deg, var(--burgundy) 0%, var(--burgundy-dark) 100%);
  color: var(--cream);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sims-tag {
  font-family: var(--font-serif-display);
  font-size: 0.88rem;
  letter-spacing: 0.5px;
  font-weight: 600;
}
.sims-close-btn {
  background: transparent;
  border: none;
  color: var(--cream);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}
.sims-image-container {
  padding: 12px;
  background: #2a0b02;
  cursor: pointer;
}
.sims-img {
  width: 100%;
  max-height: 55vh;
  object-fit: contain;
  border: 2px solid var(--cream);
  border-radius: var(--radius-xs);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  transition: transform 0.25s ease;
}
.sims-img:hover { transform: scale(1.015); }
.sims-splash-footer {
  padding: 12px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.sims-note {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin: 0;
}
.sims-enter-btn {
  font-size: 0.90rem;
  padding: 7px 20px;
}
