/* ==========================================================================
   A2Z E COMMERCE — ADVANCED CONVERSION SUITE STYLING
   ========================================================================== */

/* 1. Global Modal Backdrop & Wrapper */
.a2z-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s;
  padding: 1.25rem;
  overflow-y: auto;
}

.a2z-modal-backdrop.is-active {
  opacity: 1;
  visibility: visible;
}

.a2z-modal-dialog {
  background: #FFFFFF;
  border-radius: 18px;
  width: 100%;
  max-width: 580px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
  transform: scale(0.94) translateY(12px);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  margin: auto;
}

.a2z-modal-backdrop.is-active .a2z-modal-dialog {
  transform: scale(1) translateY(0);
}

.a2z-modal-dialog--wide {
  max-width: 740px;
}

/* Modal Header */
.a2z-modal-header {
  background: linear-gradient(135deg, #111111 0%, #1A1A1A 100%);
  color: #FFFFFF;
  padding: 1.75rem 2rem;
  position: relative;
  border-bottom: 2px solid #FF9900;
}

.a2z-modal-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 153, 0, 0.15);
  border: 1px solid rgba(255, 153, 0, 0.35);
  color: #FF9900;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.75px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}

.a2z-modal-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0 0 0.4rem 0;
  line-height: 1.25;
}

.a2z-modal-subtitle {
  font-size: 0.88rem;
  color: #9CA3AF;
  margin: 0;
  line-height: 1.45;
}

.a2z-modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  padding: 0;
}

.a2z-modal-close:hover {
  background: rgba(255, 153, 0, 0.25);
  border-color: #FF9900;
  transform: rotate(90deg);
}

.a2z-modal-close svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

/* Modal Body */
.a2z-modal-body {
  padding: 2rem;
  max-height: calc(85vh - 120px);
  overflow-y: auto;
}

/* Form Grid */
.a2z-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.15rem;
}

.a2z-form-grid .col-span-2 {
  grid-column: span 2;
}

.a2z-form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.1rem;
}

.a2z-form-grid .a2z-form-group {
  margin-bottom: 0;
}

.a2z-form-label {
  font-size: 0.84rem;
  font-weight: 700;
  color: #1F2937;
  margin-bottom: 0.45rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.a2z-form-label span.req {
  color: #FF9900;
  margin-left: 2px;
}

.a2z-form-control {
  width: 100%;
  padding: 0.78rem 1rem;
  border: 1.5px solid #E5E7EB;
  border-radius: 9px;
  font-size: 0.92rem;
  font-family: inherit;
  color: #111827;
  background-color: #F9FAFB;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
  box-sizing: border-box;
}

.a2z-form-control:focus {
  outline: none;
  border-color: #FF9900;
  background-color: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.16);
}

textarea.a2z-form-control {
  resize: vertical;
  min-height: 95px;
}

/* Select Styling */
select.a2z-form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 16px;
  padding-right: 2.5rem;
}

/* Consent Checkbox */
.a2z-consent-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 1rem;
  margin-bottom: 1.25rem;
}

.a2z-consent-checkbox {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #FF9900;
  cursor: pointer;
  flex-shrink: 0;
}

.a2z-consent-text {
  font-size: 0.78rem;
  color: #6B7280;
  line-height: 1.4;
}

/* Honeypot hidden style */
.a2z-hp-field {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  tabindex: -1 !important;
}

/* Submit Button */
.a2z-btn-submit {
  width: 100%;
  padding: 0.95rem 1.5rem;
  background: #FF9900;
  color: #111111;
  border: none;
  border-radius: 9px;
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(255, 153, 0, 0.35);
  transition: all 0.2s ease;
}

.a2z-btn-submit:hover {
  background: #E68A00;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 153, 0, 0.45);
}

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

.a2z-btn-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

/* Form Alert Boxes */
.a2z-form-alert {
  padding: 0.85rem 1.15rem;
  border-radius: 8px;
  font-size: 0.875rem;
  margin-bottom: 1.15rem;
  display: none;
  line-height: 1.45;
}

.a2z-form-alert--error {
  background-color: #FEE2E2;
  border: 1px solid #FCA5A5;
  color: #991B1B;
}

/* Success Modal View */
.a2z-success-card {
  text-align: center;
  padding: 2.5rem 1.75rem;
}

.a2z-success-icon {
  width: 68px;
  height: 68px;
  background: #DCFCE7;
  color: #16A34A;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.a2z-success-icon svg {
  width: 36px;
  height: 36px;
  stroke: currentColor;
  stroke-width: 2.5;
}

.a2z-success-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #111827;
  margin-bottom: 0.6rem;
}

.a2z-success-lead {
  font-size: 0.95rem;
  color: #4B5563;
  margin-bottom: 1.75rem;
  line-height: 1.5;
}

.a2z-success-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.a2z-btn-wa-direct {
  background: #25D366;
  color: #FFFFFF;
  font-weight: 700;
  padding: 0.85rem 1.25rem;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  font-size: 0.95rem;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
  transition: background 0.2s, transform 0.2s;
}

.a2z-btn-wa-direct:hover {
  background: #1EBE5D;
  transform: translateY(-1px);
}

.a2z-btn-cal-direct {
  background: #111111;
  color: #FFFFFF;
  font-weight: 600;
  padding: 0.85rem 1.25rem;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  font-size: 0.92rem;
  transition: background 0.2s;
}

.a2z-btn-cal-direct:hover {
  background: #2A2A2A;
}

/* Exit-Intent Modal Custom Styles */
.a2z-exit-banner {
  background: linear-gradient(135deg, #111111 0%, #222222 100%);
  border-bottom: 3px solid #FF9900;
  padding: 1.75rem 2rem;
  color: #FFFFFF;
  text-align: center;
}

.a2z-exit-badge {
  background: #FF9900;
  color: #111111;
  font-size: 0.725rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  display: inline-block;
  margin-bottom: 0.75rem;
}

.a2z-exit-benefits {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  text-align: left;
}

.a2z-exit-benefit-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: #374151;
}

.a2z-exit-benefit-item svg {
  color: #FF9900;
  flex-shrink: 0;
}

/* 2. Floating WhatsApp Widget */
.a2z-floating-wa {
  position: fixed;
  bottom: 26px;
  right: 26px;
  z-index: 998;
  display: flex;
  align-items: center;
  gap: 12px;
}

.a2z-wa-tooltip {
  background: #111111;
  color: #FFFFFF;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 0.825rem;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateX(10px);
  transition: opacity 0.25s, transform 0.25s;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.a2z-wa-tooltip::after {
  content: '';
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 5px 0 5px 5px;
  border-style: solid;
  border-color: transparent transparent transparent #111111;
}

.a2z-floating-wa:hover .a2z-wa-tooltip,
.a2z-wa-tooltip.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.a2z-wa-pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #25D366;
  border-radius: 50%;
  display: inline-block;
  animation: a2zPulse 1.8s infinite;
}

.a2z-wa-button {
  width: 58px;
  height: 58px;
  background: linear-gradient(135deg, #25D366 0%, #1EBE5D 100%);
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
  cursor: pointer;
  border: none;
  position: relative;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.25s;
}

.a2z-wa-button:hover {
  transform: scale(1.08);
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.6);
}

.a2z-wa-button svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
}

.a2z-wa-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #FF9900;
  color: #111111;
  font-size: 0.68rem;
  font-weight: 800;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #FFFFFF;
}

/* 3. Sticky Mobile Bottom Conversion Bar */
.a2z-mobile-sticky-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #111111;
  border-top: 2px solid #FF9900;
  padding: 10px 14px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  z-index: 990;
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.25);
  align-items: center;
  gap: 10px;
}

.a2z-mobile-sticky-bar .a2z-bar-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.a2z-mobile-sticky-bar .a2z-bar-btn--wa {
  background: rgba(37, 211, 102, 0.15);
  color: #25D366;
  border: 1px solid rgba(37, 211, 102, 0.4);
}

.a2z-mobile-sticky-bar .a2z-bar-btn--cta {
  background: #FF9900;
  color: #111111;
}

/* Keyframe Animations */
@keyframes a2zPulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(37, 211, 102, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

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

.a2z-spinner {
  animation: a2zSpin 0.9s linear infinite;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .a2z-mobile-sticky-bar {
    display: flex;
  }
  .a2z-floating-wa {
    display: none !important;
  }
  .a2z-form-grid {
    grid-template-columns: 1fr;
  }
  .a2z-form-grid .col-span-2 {
    grid-column: span 1;
  }
  .a2z-modal-body {
    padding: 1.25rem;
  }
  .a2z-modal-header {
    padding: 1.25rem;
  }
  .a2z-modal-title {
    font-size: 1.25rem;
  }
}
