/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */

/* RSVP Styles */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* RSVP Form Styles */
.rsvp-container,
.roulette-container {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.rsvp-card,
.roulette-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  padding: 32px 24px;
  width: 100%;
}

.rsvp-title,
.roulette-title {
  text-align: center;
  color: #333;
  margin: 0 0 32px 0;
  font-size: 28px;
  font-weight: 600;
}

/* Honor page specific title spacing */
#honor-container .rsvp-title {
  margin: 0 0 20px 0;
}

.rsvp-form {
  width: 100%;
}

.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  color: #555;
  font-weight: 500;
  font-size: 16px;
}

.form-select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
  background: white;
  color: #333;
  transition: border-color 0.2s;
}

.form-select:focus {
  outline: none;
  border-color: #667eea;
}

/* Dropdown Styles */
.dropdown-wrapper {
  position: relative;
  width: 100%;
}

.dropdown-input {
  width: 100%;
  cursor: text;
}

.dropdown-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 2px solid #e0e0e0;
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin-top: -2px;
}

.dropdown-list.hidden {
  display: none;
}

.dropdown-item {
  padding: 12px 16px;
  cursor: pointer;
  font-size: 16px;
  color: #333;
  transition: background-color 0.15s;
}

.dropdown-item:hover {
  background-color: #f0f0f0;
}

.dropdown-item:first-child {
  border-top: 1px solid #e0e0e0;
}

.confirmation-question {
  margin: 0 0 12px 0;
  color: #555;
  font-size: 16px;
  font-weight: 500;
}

.radio-group {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: #555;
  font-size: 16px;
}

.radio-input {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #667eea;
}

.form-actions,
.roulette-actions {
  margin-top: 32px;
  text-align: center;
}

.btn {
  padding: 14px 32px;
  font-size: 18px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary,
.btn-spin {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-primary:hover,
.btn-spin:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 24px;
}

.alert-error {
  background: #fee;
  color: #c33;
  border: 1px solid #fcc;
}

/* Roulette Wheel Styles */
/* --- Wheel / Pointer --- */
.wheel-wrapper {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 0 auto 28px;
  aspect-ratio: 1;
}

.wheel {
  --rotation: 0deg;
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 10px solid #1f2937;              /* slate-800 */
  box-shadow: 0 20px 50px rgba(0,0,0,.18), inset 0 0 0 6px rgba(255,255,255,.5);
  background:
    radial-gradient(closest-side, rgba(255,255,255,.45), transparent 60%),
    conic-gradient(
      #fef3c7 0 45deg,      /* yellow-100 */
      #fde68a 45deg 90deg,   /* yellow-300 */
      #fbbf24 90deg 135deg,  /* yellow-500 */
      #f59e0b 135deg 180deg, /* amber-500 */
      #10b981 180deg 225deg, /* emerald-500 */
      #06b6d4 225deg 270deg, /* cyan-500 */
      #3b82f6 270deg 315deg, /* blue-500 */
      #8b5cf6 315deg 360deg  /* violet-500 */
    );
  transform: rotate(var(--rotation));
  transition: transform 4.6s cubic-bezier(.17,.67,.12,.99);
  overflow: hidden;
}

/* decorative inner ring + gloss */
.wheel-ring {
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  border: 4px solid rgba(255,255,255,.65);
  box-shadow: inset 0 0 0 6px rgba(255,255,255,.2);
  pointer-events: none;
}
.wheel-gloss {
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 60% at 50% -10%, rgba(255,255,255,.55), transparent 35%);
  border-radius: 50%;
  pointer-events: none;
}

/* Labels at slice centers */
.wheel-label {
  --angle: calc(var(--i) * 45deg + 22.5deg); /* center of each 45° slice */
  --radius: calc(50% - 40px); /* Distance from center (adjust 40px for label position) */
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  transform-origin: 0 0;
  transform: translate(-50%, -50%) rotate(var(--angle)) translateY(calc(-1 * var(--radius)));
  pointer-events: none;
  z-index: 5;
}
.wheel-label span {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%) rotate(calc(-1 * var(--angle)));
  display: inline-block;
  background: rgba(255,255,255,.95);
  padding: .4rem .7rem;
  border-radius: .5rem;
  font-weight: 600;
  font-size: 13px;
  color: #1f2937;
  box-shadow: 0 2px 10px rgba(0,0,0,.2);
  white-space: nowrap;
  border: 1px solid rgba(0,0,0,.12);
  text-align: center;
}

/* Pointer */
.wheel-pointer {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 26px solid #ef4444;          /* red-500 */
  filter: drop-shadow(0 4px 6px rgba(0,0,0,.25));
  z-index: 10;
}

/* Result + buttons (unchanged, just minor polish) */
.result { text-align:center; margin: 20px 0; padding: 18px; background:#f8f9fa; border-radius:12px; }
.result.hidden { display:none; }
.result-message { margin:0; font-size:20px; color:#334155; line-height:1.5; }
.result-message strong { color:#2563eb; font-size:22px; }

/* Honor page styles */
.honor-content {
  text-align: center;
  padding: 20px 0;
}

.honor-gif {
  margin: 10px 0 30px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Honor loading screen */
.honor-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
}

.honor-loading-spinner {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 4px solid #e5e7eb;
  border-top-color: #667eea;
  animation: honor-spin 1s linear infinite;
  margin-bottom: 12px;
}

.honor-loading-text {
  margin: 0;
  color: #4b5563;
  font-size: 16px;
}

@keyframes honor-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Honor page specific image styling */
#honor-container .gif-animation {
  max-width: 80%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.gif-animation {
  max-width: 70%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.honor-message {
  font-size: 24px;
  color: #334155;
  line-height: 1.6;
  margin: 20px 0 0;
}

.honor-message strong {
  color: #2563eb;
  font-size: 28px;
}

.btn.btn-spin {
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  color:#fff; border:none; border-radius:12px; padding:12px 28px; font-weight:700; font-size:16px;
  box-shadow: 0 8px 22px rgba(37,99,235,.35);
}
.btn.btn-spin:hover:not(:disabled){ transform: translateY(-1px); box-shadow:0 12px 28px rgba(37,99,235,.45); }
.btn:disabled{ opacity:.6; cursor:not-allowed; }

/* Confetti (re-use your existing) */


/* Counter-rotate text to make it horizontal in each section */
/* Each section is rotated by section-index * 45deg, so we need to counter-rotate */
.wheel-section[style*="--section-index: 0"] span {
  transform: translateX(-50%) rotate(-0deg);
}

.wheel-section[style*="--section-index: 1"] span {
  transform: translateX(-50%) rotate(-45deg);
}

.wheel-section[style*="--section-index: 2"] span {
  transform: translateX(-50%) rotate(-90deg);
}

.wheel-section[style*="--section-index: 3"] span {
  transform: translateX(-50%) rotate(-135deg);
}

.wheel-section[style*="--section-index: 4"] span {
  transform: translateX(-50%) rotate(-180deg);
}

.wheel-section[style*="--section-index: 5"] span {
  transform: translateX(-50%) rotate(-225deg);
}

.wheel-section[style*="--section-index: 6"] span {
  transform: translateX(-50%) rotate(-270deg);
}

.wheel-section[style*="--section-index: 7"] span {
  transform: translateX(-50%) rotate(-315deg);
}

.wheel-section:nth-child(odd) {
  background: #f0f0f0;
}

.wheel-section:nth-child(even) {
  background: #e0e0e0;
}

.wheel-pointer {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-top: 30px solid #333;
  z-index: 10;
}

.result {
  text-align: center;
  margin: 24px 0;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
}

.result.hidden {
  display: none;
}

.result-message {
  margin: 0;
  font-size: 20px;
  color: #333;
  line-height: 1.5;
}

.result-message strong {
  color: #667eea;
  font-size: 24px;
}

/* Confetti Effect */
.confetti {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1000;
}

.confetti-item {
  position: absolute;
  width: 10px;
  height: 10px;
  background: #ff6b6b;
  border-radius: 50%;
  animation: confetti-fall linear forwards;
}

.confetti-item:nth-child(2n) {
  background: #4ecdc4;
}

.confetti-item:nth-child(3n) {
  background: #ffe66d;
}

.confetti-item:nth-child(4n) {
  background: #ff6b6b;
}

.confetti-item:nth-child(5n) {
  background: #a8e6cf;
}

@keyframes confetti-fall {
  0% {
    transform: translateY(-100vh) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

/* Mobile Responsive */
@media (max-width: 600px) {
  .rsvp-card,
  .roulette-card {
    padding: 24px 16px;
  }

  .rsvp-title,
  .roulette-title {
    font-size: 24px;
  }

  .wheel-wrapper {
    max-width: 300px;
  }

  .wheel-section {
    font-size: 12px;
    padding-top: 15px;
  }

  .result-message {
    font-size: 18px;
  }

  .result-message strong {
    font-size: 20px;
  }
}
