/* CSS Reset & Variables */
:root {
  --primary: #d66085;
  --primary-hover: #c44e73;
  --text-dark: #2d3748;
  --text-light: #718096;
  --bg-color: #fcf9f9;
  --card-bg: rgba(255, 255, 255, 0.95);
  --border-color: #e2e8f0;
  --focus-ring: rgba(214, 96, 133, 0.4);
  --error: #e53e3e;
  
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;
}

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

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background-color: var(--bg-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Background Image */
.bg-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('https://offertabs.s3.amazonaws.com/offer/5s5vx4/site/media/69f21c809c6ad0.76698113.jpg');
  background-size: cover;
  background-position: center;
  z-index: -1;
}

/* Add a subtle dark/pink gradient overlay to make text pop if needed, 
   but our card is opaque enough. We'll add a very light tint. */
.bg-wrapper::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(214, 96, 133, 0.1) 100%);
}

/* Layout */
.page-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.card-container {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08), 
              0 1px 3px rgba(0, 0, 0, 0.05);
  width: 100%;
  max-width: 600px;
  padding: 3rem;
  margin-bottom: 2rem;
  transition: all 0.3s ease;
}

/* Typography */
h1, h2, h3 {
  font-family: var(--font-heading);
  color: var(--text-dark);
}

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

.eyebrow {
  display: inline-block;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.brand-header h1 {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #d66085 0%, #ff9a9e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.subtitle {
  font-size: 1.125rem;
  color: var(--text-light);
  line-height: 1.6;
}

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

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

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

label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-dark);
  background-color: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  transition: all 0.2s ease;
}

textarea {
  resize: vertical;
  min-height: 80px;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--focus-ring);
  background-color: #fff;
}

/* Checkbox / Terms */
.terms-group {
  margin-bottom: 2rem;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-dark);
  cursor: pointer;
  line-height: 1.4;
}

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

.checkbox-label a {
  color: var(--primary);
  text-decoration: underline;
}

.checkbox-label a:hover {
  text-decoration: none;
}

/* Buttons */
.btn-primary {
  width: 100%;
  padding: 1rem 1.5rem;
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--primary) 0%, #ff8da1 100%);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 12px rgba(214, 96, 133, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(214, 96, 133, 0.4);
}

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

.btn-secondary {
  padding: 0.75rem 1.25rem;
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--text-dark);
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: #e2e8f0;
}

/* Status / Error Messages */
.error-message {
  background: #fff5f5;
  color: var(--error);
  padding: 1rem;
  border-radius: 8px;
  border-left: 4px solid var(--error);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.status-box {
  text-align: center;
  padding: 2rem;
  background: rgba(255,255,255,0.5);
  border-radius: 12px;
}

.status-box h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

/* Success Section */
#success-section {
  text-align: center;
}

.success-icon {
  width: 80px;
  height: 80px;
  background: rgba(214, 96, 133, 0.1);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

#success-section h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

#success-section p {
  color: var(--text-light);
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

/* Share Panel */
.share-box {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  margin-top: 2rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.share-box h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  font-family: var(--font-heading);
}

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

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

.share-input-group input {
  flex: 1;
  background-color: #f8fafc;
  border: 1px dashed #cbd5e1;
  color: var(--text-light);
}

.social-share {
  display: flex;
  gap: 1rem;
}

.social-btn {
  flex: 1;
  padding: 0.875rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-family: var(--font-body);
  color: #fff;
  cursor: pointer;
  transition: opacity 0.2s;
}

.social-btn:hover {
  opacity: 0.9;
}

.social-btn.fb {
  background: #1877F2;
}

.social-btn.tw {
  background: #000000;
}

/* Loader */
.loader {
  border: 3px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top: 3px solid #fff;
  width: 24px;
  height: 24px;
  -webkit-animation: spin 1s linear infinite; /* Safari */
  animation: spin 1s linear infinite;
  display: inline-block;
}

@-webkit-keyframes spin {
  0% { -webkit-transform: rotate(0deg); }
  100% { -webkit-transform: rotate(360deg); }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

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

#wbx-powered-by-slot {
  margin-top: 2rem;
  width: 100%;
}

/* Responsive */
@media (max-width: 640px) {
  .card-container {
    padding: 2rem 1.5rem;
    border-radius: 16px;
  }
  
  .brand-header h1 {
    font-size: 2.25rem;
  }
  
  .form-row {
    flex-direction: column;
    gap: 0;
  }
  
  .social-share {
    flex-direction: column;
  }
}

/* =========================================
   EMBEDDED MODE (e.g. on WLKY.com)
   ========================================= */
body.is-embedded {
  background: transparent !important;
}
body.is-embedded .bg-wrapper {
  display: none !important;
}
body.is-embedded .page-content {
  padding: 1rem 0 !important;
}
body.is-embedded .card-container {
  box-shadow: none !important;
  border: none !important;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  padding: 1rem !important;
  max-width: 800px !important;
  margin: 0 auto;
}