/* ==========================================================================
   Saltino Fast Checkout (1-Click Express Checkout)
   ========================================================================== */

/* 1. Fast Checkout Button */
.btn--fast-checkout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.875rem;
  min-height: 2.875rem;
  padding: 0 1.75rem;
  border-radius: 9999px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap !important;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
  margin: 0;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
  vertical-align: middle;
}

.btn--fast-checkout:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

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

.btn--fast-checkout .sfc-icon {
  flex-shrink: 0;
  animation: sfc-pulse 2s infinite ease-in-out;
}

@keyframes sfc-pulse {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.15); opacity: 1; }
}

/* 2. Dialog and Backdrop */
.saltino-fast-dialog {
  border: none;
  padding: 0;
  background: transparent;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.saltino-fast-dialog[open] {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.saltino-fast-dialog__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1;
}

.saltino-fast-dialog__box {
  position: relative;
  z-index: 2;
  width: 90%;
  max-width: 480px;
  background: #ffffff;
  color: #0f172a;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
  transform: scale(0.94) translateY(12px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  direction: rtl;
  max-height: 90vh;
  overflow-y: auto;
}

.saltino-fast-dialog[open] .saltino-fast-dialog__box {
  transform: scale(1) translateY(0);
}

/* Dark mode support */
[data-theme="dark"] .saltino-fast-dialog__box,
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .saltino-fast-dialog__box {
    background: #1e293b;
    color: #f8fafc;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.1);
  }
}

/* Close Button */
.saltino-fast-dialog__close {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  background: transparent;
  border: none;
  font-size: 1.75rem;
  line-height: 1;
  color: #94a3b8;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 8px;
  transition: color 0.2s, background-color 0.2s;
}

.saltino-fast-dialog__close:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

/* Header */
.saltino-fast-dialog__header {
  margin-bottom: 1.25rem;
  padding-inline-end: 2rem;
}

.saltino-fast-dialog__badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  margin-bottom: 0.5rem;
}

.saltino-fast-dialog__title {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 0.35rem 0;
  line-height: 1.3;
}

.saltino-fast-dialog__desc {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

[data-theme="dark"] .saltino-fast-dialog__desc,
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .saltino-fast-dialog__desc {
    color: #94a3b8;
  }
}

/* Product preview strip */
.saltino-fast-dialog__product-preview {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: rgba(241, 245, 249, 0.7);
  margin-bottom: 1.25rem;
  border: 1px solid rgba(226, 232, 240, 0.8);
}

[data-theme="dark"] .saltino-fast-dialog__product-preview,
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .saltino-fast-dialog__product-preview {
    background: rgba(15, 23, 42, 0.5);
    border-color: rgba(51, 65, 85, 0.8);
  }
}

.sfc-preview__title {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: inherit;
}

.sfc-preview__price {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: #10b981;
  margin-top: 0.15rem;
}

/* Form controls */
.saltino-form-row {
  margin-bottom: 1rem;
}

.saltino-form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.saltino-form-label .required {
  color: #ef4444;
}

.saltino-form-input,
.saltino-form-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.75rem 1rem;
  font-family: inherit;
  font-size: 0.9rem;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  transition: border-color 0.2s, box-shadow 0.2s;
}

[data-theme="dark"] .saltino-form-input,
[data-theme="dark"] .saltino-form-textarea,
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .saltino-form-input,
  :root:not([data-theme="light"]) .saltino-form-textarea {
    background: #0f172a;
    border-color: #334155;
    color: #f8fafc;
  }
}

.saltino-form-input:focus,
.saltino-form-textarea:focus {
  outline: none;
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.saltino-form-hint {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.3rem;
}

/* Feedback alert */
.saltino-fast-form__feedback {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.saltino-fast-form__feedback.is-error {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.saltino-fast-form__feedback.is-success {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Submit Button */
.saltino-fast-submit-btn {
  width: 100%;
  padding: 0.9rem 1.5rem;
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.saltino-fast-submit-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

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

.sfc-btn-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: sfc-spin 0.8s linear infinite;
}

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

@media (max-width: 640px) {
  .btn--fast-checkout {
    width: 100% !important;
    flex: 1 1 100% !important;
    margin: 0 !important;
    justify-content: center !important;
  }
  
  .saltino-fast-dialog__box {
    padding: 1.5rem;
    border-radius: 16px;
  }
}

/* ==========================================================================
   Saltino Trilogy Box / Virtual Bundle Perks (Luxury Mineral Edition)
   ========================================================================== */

.saltino-bundle-perks {
  margin-block: 1.5rem 1.75rem !important;
  padding: 1.25rem 1.5rem !important;
  border-radius: 16px !important;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.9) 100%) !important;
  border: 1px solid rgba(226, 232, 240, 0.9) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px -2px rgba(46, 74, 104, 0.06), 0 1px 3px rgba(0, 0, 0, 0.03) !important;
  direction: rtl !important;
  text-align: right !important;
}

[data-theme="dark"] .saltino-bundle-perks,
body.dark-mode .saltino-bundle-perks,
html.dark .saltino-bundle-perks,
body[data-theme="dark"] .saltino-bundle-perks {
  background: linear-gradient(135deg, rgba(23, 33, 50, 0.95) 0%, rgba(18, 28, 43, 0.9) 100%) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.45) !important;
}

.bundle-perks__header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 0.75rem !important;
  flex-wrap: wrap !important;
  margin-bottom: 1rem !important;
  padding-bottom: 0.75rem !important;
  border-bottom: 1px dashed rgba(203, 213, 225, 0.6) !important;
}

[data-theme="dark"] .bundle-perks__header,
body.dark-mode .bundle-perks__header,
html.dark .bundle-perks__header,
body[data-theme="dark"] .bundle-perks__header {
  border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}

.bundle-perks__badge {
  display: inline-flex !important;
  align-items: center !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
  padding: 0.35rem 0.85rem !important;
  border-radius: 9999px !important;
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.3) !important;
  line-height: 1.3 !important;
}

.bundle-perks__shipping {
  font-size: 0.825rem !important;
  font-weight: 600 !important;
  color: #059669 !important;
  display: inline-flex !important;
  align-items: center !important;
  line-height: 1.3 !important;
}

[data-theme="dark"] .bundle-perks__shipping,
body.dark-mode .bundle-perks__shipping,
html.dark .bundle-perks__shipping,
body[data-theme="dark"] .bundle-perks__shipping {
  color: #34d399 !important;
}

.bundle-perks__items {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.65rem !important;
}

.bundle-perk-item {
  display: flex !important;
  align-items: flex-start !important;
  gap: 0.65rem !important;
  font-size: 0.875rem !important;
  line-height: 1.6 !important;
  color: #334155 !important;
  direction: rtl !important;
  text-align: right !important;
}

[data-theme="dark"] .bundle-perk-item,
body.dark-mode .bundle-perk-item,
html.dark .bundle-perk-item,
body[data-theme="dark"] .bundle-perk-item {
  color: #cbd5e1 !important;
}

.bundle-perk-icon {
  color: #d97706 !important;
  font-size: 0.85rem !important;
  line-height: 1.5 !important;
  flex-shrink: 0 !important;
}

.bundle-perk-text {
  flex: 1 !important;
}

