/* ==========================================================================
   WHMCS PRO TURKISH THEME — ORDERFORM & CART FLOW STYLESHEET
   templates/orderforms/whmcs-pro-cart/css/cart.css
   ========================================================================== */

.theme-orderform-wrapper {
  padding-top: 1.5rem;
  padding-bottom: 3.5rem;
}

/* Steps Progress Indicator */
.theme-cart-steps-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.theme-step-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--theme-text-muted);
}

.theme-step-item.active {
  color: var(--theme-primary);
}

.theme-step-item.completed {
  color: var(--theme-success);
}

.theme-step-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--theme-surface-alt);
  border: 1px solid var(--theme-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.theme-step-item.active .theme-step-circle {
  background-color: var(--theme-primary);
  color: #FFFFFF;
  border-color: var(--theme-primary);
  box-shadow: 0 2px 6px rgba(var(--theme-primary-rgb), 0.35);
}

.theme-step-item.completed .theme-step-circle {
  background-color: var(--theme-success);
  color: #FFFFFF;
  border-color: var(--theme-success);
}

.theme-step-divider {
  width: 24px;
  height: 2px;
  background-color: var(--theme-border);
}

/* Category Filter Bar */
.theme-cart-category-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.theme-cart-cat-btn {
  padding: 0.5rem 1.15rem;
  border-radius: var(--theme-radius-full);
  font-size: var(--theme-text-sm);
  font-weight: 600;
  text-decoration: none;
  color: var(--theme-text-main);
  background-color: var(--theme-surface);
  border: 1px solid var(--theme-border);
  white-space: nowrap;
  transition: all var(--theme-transition-fast);
}

.theme-cart-cat-btn:hover {
  border-color: var(--theme-primary);
  color: var(--theme-primary);
}

.theme-cart-cat-btn.active {
  background-color: var(--theme-primary);
  color: #FFFFFF !important;
  border-color: var(--theme-primary);
}

/* Sticky Order Summary Sidebar */
/* Sticky Order Summary Sidebar & Override WHMCS standard_cart #666 Dark Grey */
.theme-order-summary-sidebar {
  position: sticky;
  top: 100px;
}

.theme-order-summary-card,
#order-standard_cart .order-summary,
#order-standard_cart #orderSummary .order-summary {
  background-color: var(--theme-card, #ffffff) !important;
  color: var(--theme-text-main, #0F172A) !important;
  border: 1px solid var(--theme-border, #E2E8F0) !important;
  border-bottom: 1px solid var(--theme-border, #E2E8F0) !important;
  border-radius: var(--theme-radius-card, 16px) !important;
  padding: 1.5rem !important;
  box-shadow: var(--theme-shadow-card) !important;
}

#order-standard_cart .order-summary h2,
#order-standard_cart .order-summary h3,
.theme-order-summary-title {
  background: transparent !important;
  color: var(--theme-text-main, #0F172A) !important;
  padding: 0 0 0.75rem 0 !important;
  margin: 0 0 0.75rem 0 !important;
  border-bottom: 1px solid var(--theme-border, #E2E8F0) !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  text-align: left !important;
}

#order-standard_cart .order-summary .summary-container,
.theme-order-summary-card .summary-container {
  background-color: transparent !important;
  color: var(--theme-text-main, #0F172A) !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
}

.theme-order-summary-guarantee {
  background: transparent !important;
  color: var(--theme-text-muted, #64748B) !important;
}

.theme-summary-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0;
  font-size: 0.875rem;
}

.theme-summary-total {
  border-top: 2px solid var(--theme-border);
  margin-top: 1rem;
  padding-top: 1rem;
  gap: 0.75rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--theme-primary);
}

.theme-summary-total-label {
  line-height: 1.25;
}

.theme-summary-total-amount {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--theme-primary);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Payment Gateway Tiles */
.theme-gateway-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1rem;
}

@media (min-width: 640px) {
  .theme-gateway-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.theme-gateway-tile {
  background-color: var(--theme-surface);
  border: 2px solid var(--theme-border);
  border-radius: var(--theme-radius-md);
  padding: 1rem;
  cursor: pointer;
  transition: all var(--theme-transition-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
}

.theme-gateway-tile:hover {
  border-color: var(--theme-primary);
  background-color: var(--theme-surface-hover);
}

.theme-gateway-tile.active,
.theme-gateway-tile:has(input[type="radio"]:checked) {
  border-color: var(--theme-primary);
  background-color: var(--theme-primary-light);
}

.theme-gateway-tile input[type="radio"]:checked + .gateway-content {
  border: 1px solid var(--theme-primary);
  background-color: var(--theme-primary-light);
  border-radius: var(--theme-radius-md);
}

/* Domain Options Tabs */
.theme-domain-options-tabs {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.theme-domain-option-radio {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background-color: var(--theme-surface);
  border: 1px solid var(--theme-border);
  border-radius: var(--theme-radius-md);
  cursor: pointer;
  transition: all var(--theme-transition-fast);
}

.theme-domain-option-radio:hover {
  border-color: var(--theme-primary);
}

.theme-domain-option-radio.active {
  border-color: var(--theme-primary);
  background-color: var(--theme-surface-alt);
}


/* 2-Column Product Configuration & Cart Layout */
.theme-config-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.theme-config-columns > * {
  min-width: 0;
}

@media (min-width: 1024px) {
  .theme-config-columns {
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 2rem;
  }

  .theme-config-form-col {
    grid-column: 1;
    grid-row: 1;
  }

  .theme-config-actions-row {
    grid-column: 1;
    grid-row: 2;
  }

  .theme-config-summary-col {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
}

.theme-mobile-only-inline {
  display: none;
}

@media (max-width: 768px) {
  .theme-mobile-only-inline {
    display: inline;
    margin-left: 0.25rem;
  }

  .theme-config-actions-row {
    width: 100%;
    padding-top: 0.25rem;
  }

  .theme-config-actions-row #btnCompleteProductConfig,
  .theme-config-actions-row #btnAddToCart {
    flex: 1 1 auto;
    justify-content: center;
  }

  .theme-promo-form {
    flex-wrap: wrap;
  }

  .theme-promo-form .theme-input {
    flex: 1 1 180px;
    min-width: 0;
  }

  .theme-promo-form .btn-theme {
    flex: 1 1 auto;
    justify-content: center;
  }
}

.theme-domain-option-radio input[type="radio"],
.theme-domain-option-label input[type="radio"],
.theme-domain-radio-input {
  margin-top: 0.1rem;
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  max-width: 20px !important;
  accent-color: var(--theme-primary);
  flex: 0 0 20px !important;
  position: relative !important;
  top: auto !important;
  left: auto !important;
}

.domain-selection-options .option {
  overflow: visible !important;
}

.domain-selection-options .option label,
.theme-domain-option-label {
  display: flex !important;
  align-items: center !important;
  gap: 0.65rem !important;
  width: 100%;
  line-height: 1.35;
}

.domain-selection-options .iradio_square-blue {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  max-width: 20px !important;
  flex: 0 0 20px !important;
  position: relative !important;
  margin: 0 !important;
  border-radius: 50% !important;
  border: 2px solid var(--theme-border-strong, #94A3B8) !important;
  background: var(--theme-surface, #ffffff) !important;
  box-sizing: border-box !important;
}

.domain-selection-options .iradio_square-blue.checked {
  border-color: var(--theme-primary, #1D4ED8) !important;
}

.domain-selection-options .iradio_square-blue.checked::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--theme-primary, #1D4ED8);
  display: block;
}

.domain-selection-options .iradio_square-blue input[type="radio"] {
  opacity: 0 !important;
  position: absolute !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
}

/* Domain Lookup & Own Domain Composite Row (Desktop & Mobile) */
.theme-domain-lookup-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
}

.theme-domain-sld-col {
  flex: 1 1 auto;
  min-width: 0;
}

.theme-owndomain-composite {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background-color: var(--theme-surface-alt);
  border: 1px solid var(--theme-border);
  border-radius: var(--theme-radius-md);
  padding: 0.35rem 0.55rem;
}

.theme-owndomain-prefix {
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--theme-text-muted);
  flex-shrink: 0;
  padding-left: 0.25rem;
}

.theme-owndomain-dot {
  font-weight: 800;
  font-size: 1rem;
  color: var(--theme-text-muted);
  flex-shrink: 0;
}

.theme-owndomain-sld-input {
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

.theme-owndomain-tld-input {
  width: 90px !important;
  flex: 0 0 90px !important;
}

.theme-owndomain-tld-select {
  width: 130px !important;
  flex: 0 0 130px !important;
}

.theme-domain-lookup-btn {
  flex-shrink: 0;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .theme-domain-lookup-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }

  .theme-owndomain-composite {
    width: 100%;
    padding: 0.3rem 0.45rem;
    gap: 0.3rem;
  }

  .theme-owndomain-prefix {
    font-size: 0.8rem;
    padding-left: 0.15rem;
  }

  .theme-owndomain-sld-input {
    padding: 0.55rem 0.6rem !important;
    font-size: 0.875rem !important;
  }

  .theme-owndomain-tld-input {
    width: 72px !important;
    flex: 0 0 72px !important;
    padding: 0.55rem 0.5rem !important;
    font-size: 0.875rem !important;
    text-align: center;
  }

  .theme-owndomain-tld-select {
    width: 105px !important;
    flex: 0 0 105px !important;
    padding: 0.55rem 0.45rem !important;
    font-size: 0.85rem !important;
  }

  .theme-domain-lookup-btn {
    width: 100%;
    justify-content: center;
  }
}

.theme-domain-check-result {
  margin-top: 1rem;
  padding: 0.875rem 1.25rem;
  background-color: var(--theme-surface);
  border: 1px solid var(--theme-success, #10B981);
  border-radius: var(--theme-radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* WHMCS Live Domain Lookup & Add-to-Cart Button State Visibility */
.w-hidden {
  display: none;
}

.wpt-whois-btn.w-hidden {
  display: none !important;
}

.btn-add-to-cart .loading,
.btn-add-to-cart .added,
.btn-add-to-cart .unavailable {
  display: none;
}

.btn-add-to-cart.loading .to-add,
.btn-add-to-cart.added .to-add,
.btn-add-to-cart.unavailable .to-add {
  display: none;
}

.btn-add-to-cart.loading .loading,
.btn-add-to-cart.added .added,
.btn-add-to-cart.unavailable .unavailable {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}


/* Modern Responsive Domain Search Results (#DomainSearchResults, Spotlight TLDs, Suggestions) */
#DomainSearchResults {
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

#DomainSearchResults #primaryLookupResult {
  background: var(--theme-surface, #ffffff);
  border: 1px solid var(--theme-border, #e2e8f0);
  border-radius: 14px;
  padding: 1.15rem 1.35rem;
  box-shadow: 0 8px 24px -12px rgba(15, 23, 42, 0.08);
}

#DomainSearchResults .domain-unavailable,
#DomainSearchResults .domain-tld-unavailable,
#DomainSearchResults .domain-invalid {
  background: rgba(239, 68, 68, 0.07);
  border: 1px solid rgba(239, 68, 68, 0.22);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  color: #b91c1c;
  font-size: 0.95rem;
}

#DomainSearchResults .domain-available {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
}

#DomainSearchResults .wpt-hero-status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  font-size: 1rem;
}

#DomainSearchResults .wpt-hero-status-icon.is-unavailable {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

#DomainSearchResults .wpt-filter-pill {
  border: 1px solid var(--theme-border, #e2e8f0);
  background: var(--theme-surface, #ffffff);
  color: var(--theme-text-muted, #64748b);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

#DomainSearchResults .wpt-filter-pill.active,
#DomainSearchResults .wpt-filter-pill:hover {
  background: var(--theme-primary, #1d4ed8);
  border-color: var(--theme-primary, #1d4ed8);
  color: #ffffff;
}

#DomainSearchResults .spotlight-tlds-container {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.65rem !important;
  width: 100%;
}

#DomainSearchResults .spotlight-tld-container {
  width: 100%;
  min-width: 0;
}

#DomainSearchResults .spotlight-tld {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: auto !important;
  min-height: 62px;
  padding: 0.85rem 1.15rem !important;
  border-radius: 14px;
  background: var(--theme-surface, #ffffff);
  border: 1px solid var(--theme-border, #e2e8f0);
  box-shadow: 0 2px 10px -6px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  text-align: left !important;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

#DomainSearchResults .spotlight-tld:hover {
  transform: translateY(-1px);
  border-color: rgba(29, 78, 216, 0.35);
  box-shadow: 0 8px 18px -10px rgba(29, 78, 216, 0.16);
}

#DomainSearchResults .spotlight-tld .wpt-spotlight-left {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

#DomainSearchResults .spotlight-tld .wpt-spotlight-domain {
  font-weight: 800;
  font-size: 1rem;
  color: var(--theme-text-main, #0f172a);
  word-break: break-word;
}

#DomainSearchResults .spotlight-tld .wpt-spotlight-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

#DomainSearchResults .spotlight-tld .domain-lookup-result {
  width: auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0 !important;
}

#DomainSearchResults .spotlight-tld .unavailable,
#DomainSearchResults .spotlight-tld .invalid {
  background: var(--theme-surface-alt, #f1f5f9) !important;
  color: var(--theme-text-muted, #64748b) !important;
  border: 1px solid var(--theme-border, #e2e8f0) !important;
  border-radius: 999px !important;
  padding: 0.32rem 0.85rem !important;
  font-size: 0.76rem !important;
  font-weight: 700 !important;
  width: auto !important;
  opacity: 0.92;
  box-shadow: none !important;
}

#DomainSearchResults .spotlight-tld .available.price {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--theme-text-main, #0f172a);
  margin: 0 !important;
  white-space: nowrap;
}

#DomainSearchResults .spotlight-tld .btn-add-to-cart {
  width: auto;
  justify-content: center;
  padding: 0.45rem 0.95rem;
  border-radius: 9px;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

#DomainSearchResults .spotlight-tld .btn-add-to-cart span,
#DomainSearchResults .spotlight-tld .wpt-whois-btn span {
  display: inline;
  padding: 0;
}

/* In-Page WHOIS Modal */
.wpt-whois-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.wpt-whois-modal.w-hidden {
  display: none !important;
}

.wpt-whois-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
}

.wpt-whois-dialog {
  position: relative;
  width: 100%;
  max-width: 680px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  background: var(--theme-surface, #ffffff);
  border: 1px solid var(--theme-border, #e2e8f0);
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35);
  overflow: hidden;
  z-index: 1;
}

.wpt-whois-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--theme-border, #e2e8f0);
}

.wpt-whois-header .wpt-whois-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--theme-text-muted, #64748b);
  cursor: pointer;
}

.wpt-whois-body {
  padding: 1rem 1.25rem;
  overflow-y: auto;
  flex: 1 1 auto;
}

.wpt-whois-output,
.wpt-whois-pre {
  background: var(--theme-surface-alt, #f8fafc);
  border: 1px solid var(--theme-border, #e2e8f0);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--theme-text-main, #0f172a);
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
}

.wpt-whois-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--theme-border, #e2e8f0);
}

#DomainSearchResults .suggested-domains .theme-card {
  border-radius: 14px;
  border: 1px solid var(--theme-border, #e2e8f0);
}

#DomainSearchResults #domainSuggestions.list-group {
  margin-bottom: 0;
  border-radius: 10px;
  overflow: hidden;
}

#DomainSearchResults #domainSuggestions .domain-suggestion.list-group-item {
  background: var(--theme-surface, #ffffff);
  border-color: var(--theme-border, #e2e8f0);
  padding: 0.75rem 1rem;
}

#DomainSearchResults .more-suggestions .btn-theme,
#DomainSearchResults #moreSuggestions {
  border-radius: 999px;
  padding: 0.55rem 1.35rem;
  font-weight: 700;
}

/* Dark mode support for domain lookup & WHOIS */
[data-theme="dark"] #DomainSearchResults #primaryLookupResult,
html.dark #DomainSearchResults #primaryLookupResult,
[data-theme="dark"] #DomainSearchResults .spotlight-tld,
html.dark #DomainSearchResults .spotlight-tld,
[data-theme="dark"] #DomainSearchResults .wpt-filter-pill,
html.dark #DomainSearchResults .wpt-filter-pill,
[data-theme="dark"] .wpt-whois-dialog,
html.dark .wpt-whois-dialog,
[data-theme="dark"] #DomainSearchResults #domainSuggestions .domain-suggestion.list-group-item,
html.dark #DomainSearchResults #domainSuggestions .domain-suggestion.list-group-item {
  background: var(--theme-surface, #111827);
  border-color: var(--theme-border, #1f2937);
  color: var(--theme-text-main, #f3f4f6);
}

[data-theme="dark"] .wpt-whois-output,
html.dark .wpt-whois-output,
[data-theme="dark"] .wpt-whois-pre,
html.dark .wpt-whois-pre {
  background: #0b1120;
  border-color: #1f2937;
  color: #e2e8f0;
}

[data-theme="dark"] #DomainSearchResults .spotlight-tld .unavailable,
html.dark #DomainSearchResults .spotlight-tld .unavailable,
[data-theme="dark"] #DomainSearchResults .spotlight-tld .invalid,
html.dark #DomainSearchResults .spotlight-tld .invalid {
  background: var(--theme-surface-alt, #1f2937) !important;
  color: var(--theme-text-muted, #9ca3af) !important;
  border-color: var(--theme-border, #374151) !important;
}

/* Mobile Responsive Domain Search Results */
@media (max-width: 640px) {
  #DomainSearchResults .domain-unavailable.theme-flex {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
  }

  #DomainSearchResults .spotlight-tld {
    flex-direction: column;
    align-items: flex-start;
    height: auto !important;
    padding: 0.9rem !important;
    gap: 0.7rem;
  }

  #DomainSearchResults .spotlight-tld .wpt-spotlight-right,
  #DomainSearchResults .spotlight-tld .domain-lookup-result {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  #DomainSearchResults #domainSuggestions .domain-suggestion .theme-flex {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }

  #DomainSearchResults #domainSuggestions .domain-suggestion .actions {
    justify-content: space-between;
    width: 100%;
  }

  #DomainSearchResults .domain-available .theme-flex {
    flex-direction: column;
    align-items: flex-start;
  }
}
