/* =========================================
   VARIABLES & SETUP
========================================= */
:root {
  /* Nissan/Flow Automotive inspired palette */
  --c-primary: #C3002F; /* Nissan Red */
  --c-primary-hover: #A00026;
  --c-secondary: #0F204B; /* Deep Blue */
  
  --text-dark: #1F2937;
  --text-muted: #6B7280;
  --text-light: #F9FAFB;
  
  --bg-color: #F3F4F6;
  --card-bg: rgba(255, 255, 255, 0.95);
  
  --border-radius-lg: 20px;
  --border-radius-md: 12px;
  --border-radius-sm: 8px;
  
  --shadow-sm: 0 4px 6px -1px rgba(0,0,0,0.05);
  --shadow-md: 0 10px 30px -5px rgba(15, 32, 75, 0.15);
  --shadow-lg: 0 20px 40px -10px rgba(15, 32, 75, 0.25);
  
  --transition: all 0.3s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Open Sans', sans-serif;
  color: var(--text-dark);
  background-color: var(--bg-color);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: 'Montserrat', sans-serif;
  line-height: 1.2;
}

.hidden {
  display: none !important;
}

/* =========================================
   DECORATIVE BACKGROUND
========================================= */
.bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
  opacity: 0.5;
}

.blob-1 {
  top: -10%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: var(--c-primary);
  mix-blend-mode: multiply;
}

.blob-2 {
  bottom: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: var(--c-secondary);
  mix-blend-mode: multiply;
}

/* =========================================
   LAYOUT
========================================= */
.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 2rem 1.5rem;
}

.container {
  max-width: 750px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  flex-grow: 1;
  width: 100%;
}

@media (min-width: 900px) {
  .page-wrapper {
    padding: 3rem 2rem;
  }
}

/* =========================================
   HEADER SECTION
========================================= */
.header-section {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dealership-name {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  display: block;
}

.main-title {
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--c-secondary);
}

.main-title .highlight {
  background: linear-gradient(135deg, var(--c-primary), #FF4B6E);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead-text {
  font-size: 1.15rem;
  line-height: 1.7;
  color: #4B5563;
  max-width: 650px;
  margin: 0 auto;
}

@media (min-width: 900px) {
  .main-title {
    font-size: 3.5rem;
  }
}

/* =========================================
   FORM & CARDS
========================================= */
.card, .status-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--border-radius-lg);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-lg);
}

.card-header {
  margin-bottom: 2rem;
  text-align: center;
}

.card-header h2 {
  font-size: 2rem;
  color: var(--c-secondary);
  margin-bottom: 0.5rem;
}

.card-header p {
  color: var(--text-muted);
}

/* Form Styles */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: var(--c-secondary);
}

input[type="text"],
input[type="email"],
input[type="tel"],
select {
  width: 100%;
  padding: 0.9rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-dark);
  background-color: #fff;
  border: 1.5px solid #E5E7EB;
  border-radius: var(--border-radius-md);
  transition: var(--transition);
}

input:focus, select:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 4px rgba(195, 0, 47, 0.1);
}

input::placeholder {
  color: #9CA3AF;
}

/* Custom Select */
select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B7280' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  cursor: pointer;
}

/* Custom Checkbox */
.checkbox-group {
  margin-top: 1rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  position: relative;
  cursor: pointer;
  font-weight: 400 !important;
  color: var(--text-dark) !important;
  user-select: none;
}

.checkbox-label input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  height: 22px;
  width: 22px;
  background-color: #fff;
  border: 1.5px solid #E5E7EB;
  border-radius: 6px;
  margin-right: 12px;
  position: relative;
  transition: var(--transition);
  flex-shrink: 0;
}

.checkbox-label:hover input ~ .checkmark {
  border-color: var(--c-primary);
}

.checkbox-label input:checked ~ .checkmark {
  background-color: var(--c-primary);
  border-color: var(--c-primary);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
  left: 7px;
  top: 3px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-label input:checked ~ .checkmark:after {
  display: block;
}

/* Buttons */
.btn-primary, .btn-secondary {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 1rem 1.5rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  border: none;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.btn-primary {
  background: linear-gradient(135deg, var(--c-primary) 0%, #E60036 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(195, 0, 47, 0.3);
  margin-top: 2rem;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(195, 0, 47, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  background: #9CA3AF;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

/* Loader */
.loader {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
  margin-left: 10px;
  position: absolute;
}
.btn-text.loading { visibility: hidden; }
.btn-text.loading + .loader { position: static; margin: 0; }

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

/* Error Message */
.error-banner {
  background-color: #FEE2E2;
  color: #B91C1C;
  padding: 1rem;
  border-radius: var(--border-radius-md);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-left: 4px solid #EF4444;
}

/* =========================================
   SUCCESS / STATUS STATES
========================================= */
.status-card {
  text-align: center;
}

.status-card .icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.success-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.success-icon {
  width: 64px;
  height: 64px;
  background-color: #10B981;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1.5rem;
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
}

.success-header h2 {
  color: var(--c-secondary);
  margin-bottom: 0.5rem;
}

/* Share Panel */
.share-panel {
  background-color: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: var(--border-radius-md);
  padding: 1.5rem;
  margin-top: 1rem;
}

.share-panel h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--c-secondary);
}

.share-panel p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

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

.share-input-group input {
  flex: 1;
  background: #fff;
}

.btn-secondary {
  background: var(--c-secondary);
  color: #fff;
  width: auto;
  padding: 0.9rem 1.5rem;
}

.btn-secondary:hover {
  background: #1e3a8a;
}

.copy-feedback {
  font-size: 0.85rem;
  color: #10B981;
  margin-top: 0.5rem;
  font-weight: 600;
  text-align: center;
}

/* =========================================
   POWERED BY
========================================= */
#wbx-powered-by-slot {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  width: 100%;
}
