/*
 * Application CSS — Minimal resets for Tailwind v4 + Alpine.js
 *

 */

/* Alpine.js cloaking */
[x-cloak] { display: none !important; }

/* Bootstrap display utility compatibility layer
   Required because JS code (Stimulus controllers, inline scripts)
   use classList.add/remove('d-none') etc. */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }
@media (min-width: 768px) {
  .d-md-none { display: none !important; }
  .d-md-block { display: block !important; }
  .d-md-flex { display: flex !important; }
}
@media (min-width: 992px) {
  .d-lg-none { display: none !important; }
  .d-lg-block { display: block !important; }
}

/* Bootstrap position/transform compatibility */
.position-fixed { position: fixed; }
.position-absolute { position: absolute; }
.position-relative { position: relative; }
.top-50 { top: 50%; }
.translate-middle-y { transform: translateY(-50%); }
.text-end { text-align: right; }
.text-capitalize { text-transform: capitalize; }
.pe-4 { padding-right: 1rem; }

/* Bootstrap accordion compatibility for marketing FAQ sections */
.accordion-item { overflow: hidden; }
.accordion-header { margin: 0; }
.accordion-button {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 1rem 1.25rem;
  font-size: 1rem;
  color: inherit;
  text-align: left;
  background-color: transparent;
  border: 0;
  overflow-anchor: none;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out;
  cursor: pointer;
}
.accordion-button:not(.collapsed)::after {
  transform: rotate(-180deg);
}
.accordion-button::after {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin-left: auto;
  content: "";
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23212529'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-size: 1.25rem;
  transition: transform 0.2s ease-in-out;
}
.accordion-body {
  padding: 0 1.25rem 1rem;
}

/* Bootstrap spinner compatibility */
.spinner-border {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  vertical-align: text-bottom;
  border: 0.25em solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spinner-border 0.75s linear infinite;
}
.spinner-border-sm { width: 1rem; height: 1rem; border-width: 0.2em; }
@keyframes spinner-border { to { transform: rotate(360deg); } }

/* Bootstrap progress bar compatibility */
.progress {
  display: flex;
  height: 1rem;
  overflow: hidden;
  font-size: 0.75rem;
  background-color: var(--color-muted, #e9ecef);
  border-radius: 0.375rem;
}
.progress-bar {
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  color: #fff;
  text-align: center;
  white-space: nowrap;
  background-color: var(--color-secondary, #30639A);
  transition: width 0.6s ease;
}

/* Bootstrap btn-close compatibility */
.btn-close {
  box-sizing: content-box;
  width: 1em;
  height: 1em;
  padding: 0.25em;
  color: #000;
  background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;
  border: 0;
  border-radius: 0.375rem;
  opacity: 0.5;
  cursor: pointer;
}
.btn-close:hover { opacity: 0.75; }

/* Modal step utility (used by email modal wizard) */
.modal-step { display: none; }
.modal-step.active { display: block; }

/* Bootstrap modal CSS compatibility layer
   Required for large modals (account_info, smtp_options, bulk_google)
   that still use modal-dialog/modal-content structure */
.modal { display: none; position: fixed; top: 0; left: 0; z-index: 1050; width: 100%; height: 100%; overflow-x: hidden; overflow-y: auto; outline: 0; background-color: rgba(0,0,0,0.5); }
.modal.show { display: block; }
.modal-dialog { position: relative; width: auto; margin: 1.75rem auto; max-width: 500px; pointer-events: none; }
.modal-dialog-centered { display: flex; align-items: center; min-height: calc(100% - 3.5rem); }
.modal-lg { max-width: 800px; }
.modal-xl { max-width: 1140px; }
.modal-content { position: relative; display: flex; flex-direction: column; width: 100%; pointer-events: auto; background-color: var(--color-card, #fff); background-clip: padding-box; border: 1px solid var(--color-border, rgba(0,0,0,.175)); border-radius: 0.5rem; outline: 0; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.5rem; border-bottom: 1px solid var(--color-border, #dee2e6); }
.modal-body { position: relative; flex: 1 1 auto; padding: 1rem 1.5rem; }
.modal-footer { display: flex; align-items: center; justify-content: flex-end; padding: 0.75rem 1.5rem; border-top: 1px solid var(--color-border, #dee2e6); gap: 0.5rem; }
.modal-title { margin: 0; line-height: 1.5; }

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Animation keyframes used across the app */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideOutRight {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(16px); }
}

.animate-fade-in-up { animation: fadeInUp 0.3s ease-out; }
.animate-fade-in-down { animation: fadeInDown 0.3s ease-out; }
.animate-slide-in-right { animation: slideInRight 0.3s ease-out; }
.animate-slide-out-right { animation: slideOutRight 0.3s ease-out; }

  /* Soft Background Colors */
  --bg-soft-purple: var(--color-muted);
