/* ========================================
   MODERN CHECKOUT FORM - FASHION NOVA INSPIRED
   ======================================== */

/* Social Login Buttons (Fashion Nova style) */
.btn-social {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border: 2px solid var(--ink-200);
  border-radius: 8px;
  background: white;
  color: var(--ink-900);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
}

.btn-social:hover {
  border-color: var(--brand-500);
  background: var(--brand-50);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.btn-social:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.btn-google {
  border-color: #4285F4;
  color: #4285F4;
}

.btn-google:hover {
  background: #f8f9fa;
  border-color: #1a73e8;
}

.btn-facebook {
  border-color: #1877F2;
  color: #1877F2;
}

.btn-facebook:hover {
  background: #f0f2f5;
  border-color: #0d5bd8;
}

.social-login-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .btn-social {
    width: 100%;
    max-width: 100%;
  }
  
  .social-login-buttons {
    flex-direction: column;
  }
}

/* Compact checkout form sections */
.checkout-form-modern {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.checkout-section {
  padding: 20px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.checkout-section-title {
  margin: 0 0 16px 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink-900);
  letter-spacing: -0.01em;
}

/* Compact grid - 2 columns on desktop, 1 on mobile */
.checkout-grid-compact {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.checkout-field-compact {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.checkout-field-full-width {
  grid-column: 1 / -1;
}

.checkout-label-compact {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-700);
  margin: 0;
}

.checkout-input-compact {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  border: 1.5px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  background: #fff;
  color: var(--ink-900);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
}

.checkout-input-compact:focus {
  outline: none;
  border-color: var(--brand-600);
  box-shadow: 0 0 0 3px rgba(244, 114, 182, 0.1);
  transform: translateY(-1px);
}

/* Payment options - Fashion Nova style cards */
.checkout-payment-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.checkout-payment-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 12px;
  border: 2px solid rgba(15, 23, 42, 0.1);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.checkout-payment-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.checkout-payment-card:hover {
  border-color: var(--brand-500);
  background: rgba(244, 114, 182, 0.03);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(244, 114, 182, 0.15);
}

.checkout-payment-card input[type="radio"]:checked + .payment-icon,
.checkout-payment-card:has(input[type="radio"]:checked) {
  border-color: var(--brand-600);
  background: rgba(244, 114, 182, 0.08);
  box-shadow: 0 0 0 3px rgba(244, 114, 182, 0.15);
}

.payment-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.payment-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-700);
}

/* Messages */
.checkout-message {
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  margin: 0;
}

.checkout-message-error {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.checkout-message-success {
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
  border: 1px solid rgba(34, 197, 94, 0.2);
  padding: 20px !important;
}

.checkout-message-success pre {
  margin: 0;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  background: transparent;
  border: none;
}

.bank-instructions {
  margin-top: 12px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.05);
  border-radius: 8px;
  border-left: 3px solid var(--brand-600);
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
  color: var(--ink-700);
}

/* Actions */
.checkout-actions-compact {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.btn-submit-checkout {
  width: 100%;
  padding: 16px 24px;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand-600), var(--brand-700));
  color: white;
  border: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-submit-checkout:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(236, 72, 153, 0.3);
}

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

.btn-secondary-compact {
  width: 100%;
  padding: 14px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.04);
  color: var(--ink-700);
  border: 1.5px solid rgba(15, 23, 42, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-secondary-compact:hover {
  background: rgba(15, 23, 42, 0.08);
  border-color: rgba(15, 23, 42, 0.2);
  transform: translateY(-1px);
}

/* Quick checkout button on product cards - green accent */
.btn-quick-checkout {
  width: 100%;
  padding: 12px 16px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 10px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-quick-checkout .emoji-icon {
  font-size: 1rem;
  line-height: 1;
}

.btn-quick-checkout:hover {
  background: linear-gradient(135deg, #059669, #047857);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(16, 185, 129, 0.25);
}

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

/* Add to cart button - pink/primary style */
.product-actions .btn-primary.add-btn {
  background: linear-gradient(135deg, var(--brand-600), var(--brand-700));
  color: white;
  border: none;
}

.product-actions .btn-primary.add-btn .emoji-icon {
  font-size: 1rem;
  line-height: 1;
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .checkout-section {
    padding: 16px;
  }
  
  .checkout-grid-compact {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  
  .checkout-payment-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .checkout-payment-card {
    flex-direction: row;
    justify-content: flex-start;
    padding: 14px 16px;
  }
  
  .checkout-input-compact {
    padding: 14px 16px;
    font-size: 16px; /* Prevent zoom on iOS */
  }
  
  .checkout-actions-compact {
    gap: 10px;
  }
  
  .btn-submit-checkout,
  .btn-secondary-compact {
    padding: 16px 20px;
    font-size: 1rem;
  }
}

@media (max-width: 520px) {
  .checkout-section {
    padding: 14px;
    border-radius: 10px;
  }
  
  .checkout-section-title {
    font-size: 1rem;
    margin-bottom: 12px;
  }
  
  .checkout-grid-compact {
    gap: 12px;
  }
  
  .checkout-label-compact {
    font-size: 0.85rem;
  }
}

/*
 * iOS Safari / bfcache: fluidity-improvements.css animates .modal / .modal-content from opacity:0.
 * Po 3DS alebo obnovení karty môže animácia ostať v „neviditeľnom“ stave — používateľ vidí len prázdnu
 * tmavú plochu bez textu. Checkout modal animácie vypneme a obsah vynútime viditeľný.
 */
#checkoutModal.modal.open {
  animation: none !important;
  opacity: 1 !important;
}

#checkoutModal.modal.open .modal-content {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
  color: var(--ink-800, #0f172a);
  background: var(--surface, #ffffff);
}

