/* CSS Reset & Variables */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #000000;
  --primary-light: #222222;
  --accent: #d52b1e; /* MINI Red */
  --accent-hover: #b82318;
  --text-dark: #111111;
  --text-body: #555555;
  --text-light: #ffffff;
  --bg-color: #f4f4f4;
  --surface: #ffffff;
  --border: #d1d5db;
  --error: #d52b1e;
  --success: #059669;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-dark);
  background-color: var(--bg-color);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .submit-btn {
  font-family: 'Montserrat', sans-serif;
}

/* Utilities */
.hidden {
  display: none !important;
}

.text-accent {
  color: var(--accent);
}

/* Centered Layout */
.centered-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

/* Form Panel */
.content-panel {
  width: 100%;
  max-width: 650px;
  background: var(--surface);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 10px 40px rgba(0,0,0,0.08);
  z-index: 5;
  overflow: hidden;
}

.content-panel::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: var(--accent);
  z-index: 10;
}

.content-inner {
  padding: 4rem 3rem;
  width: 100%;
}

.state-container {
  width: 100%;
  animation: fadeIn 0.4s ease-out;
}

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

/* Status States (Success, Ended, Pending) */
.icon-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #f8f8f8;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--primary);
}

.icon-circle.success {
  background: rgba(5, 150, 105, 0.1);
  border-color: transparent;
  color: var(--success);
}

.state-container h2 {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: -0.5px;
}

.state-container p {
  font-size: 1.0625rem;
  color: var(--text-body);
  line-height: 1.6;
}

/* Form Styles */
.form-header {
  margin-bottom: 2.5rem;
}

.form-header h2 {
  font-size: 2.25rem;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: -0.5px;
}

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

.form-row {
  display: flex;
  gap: 1.5rem;
}

.form-row .form-group {
  flex: 1;
}

.form-group {
  margin-bottom: 1.5rem;
  text-align: left;
}

.form-group label {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.form-group input:not([type="checkbox"]),
.form-group select {
  width: 100%;
  padding: 1rem 1.25rem;
  font-size: 1rem;
  font-family: inherit;
  border: 2px solid var(--border);
  border-radius: 8px;
  background-color: #fafafa;
  color: var(--text-dark);
  transition: all 0.2s ease;
}

.select-wrapper {
  position: relative;
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.25rem center;
  padding-right: 3rem;
  cursor: pointer;
}

.form-group input:not([type="checkbox"]):focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  background-color: var(--surface);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.form-group input::placeholder {
  color: #9ca3af;
}

/* Waiver Styles */
.waiver-group {
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.waiver-box {
  background: #f9f9f9;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  max-height: 250px;
  overflow-y: auto;
  font-size: 0.85rem;
  color: var(--text-body);
  margin-bottom: 1rem;
}

.waiver-box h4 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.waiver-box p {
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.waiver-box ul {
  padding-left: 1.25rem;
  margin-bottom: 0.75rem;
}

.waiver-box li {
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.checkbox-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.checkbox-wrapper input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.125rem;
  accent-color: var(--accent);
  cursor: pointer;
}

.checkbox-label {
  font-family: 'Inter', sans-serif !important;
  font-size: 0.95rem !important;
  font-weight: 500 !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  color: var(--text-dark) !important;
  cursor: pointer;
  line-height: 1.5;
  margin-bottom: 0 !important;
}

/* Submit Button */
.submit-btn {
  width: 100%;
  padding: 1.125rem;
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1.5rem;
  box-shadow: 0 4px 6px rgba(213, 43, 30, 0.2);
}

.submit-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(213, 43, 30, 0.3);
}

.submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.spin {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Error Banner */
.error-banner {
  background: rgba(213, 43, 30, 0.1);
  color: var(--error);
  border-left: 4px solid var(--error);
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
}

/* Share Panel */
.share-box {
  margin-top: 2.5rem;
  padding: 2rem;
  background: #f9f9f9;
  border-radius: 12px;
  border: 2px solid var(--border);
}

.share-box h3 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--primary);
  font-family: 'Montserrat', sans-serif;
  text-transform: uppercase;
}

.share-box p {
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.share-input-group {
  display: flex;
  gap: 0.5rem;
}

.share-input-group input {
  flex: 1;
  padding: 0.875rem 1rem;
  border: 2px solid var(--border);
  border-radius: 6px;
  font-size: 0.9rem;
  background: var(--surface);
  color: var(--text-body);
}

.share-input-group button {
  padding: 0 1.5rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
}

.share-input-group button:hover {
  background: var(--primary-light);
}

.feedback-text {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--success);
  font-weight: 600;
}

/* Countdown */
.countdown {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.countdown-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 8px;
  min-width: 70px;
  padding: 1rem 0.5rem;
}

.countdown-block span {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary);
  font-family: 'Montserrat', sans-serif;
  line-height: 1;
}

.countdown-block label {
  font-size: 0.75rem;
  color: var(--text-body);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 0.5rem;
  font-weight: 600;
}

/* Powered By Element Placeholder */
#wbx-powered-by-slot {
  width: 100%;
  padding: 1.5rem;
  display: flex;
  justify-content: center;
  margin-top: auto;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .content-inner {
    padding: 3rem 1.5rem;
  }
  .form-row {
    flex-direction: column;
    gap: 0;
  }
}