/* ============================================
   VirtuHost 2026 - Cart Bridge CSS
   ============================================ */

/* ── Results Table Header ── */
.vh-results-header {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
}
.vh-col-status { text-align: center; min-width: 100px; }
.vh-col-action { text-align: right; min-width: 160px; }

.vh-results-container { padding: 0; }

/* ── Result Query Label ── */
.result-query { padding: 0.75rem 1.5rem 0.25rem; }
.result-query-text {
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Result Group ── */
.result-group { display: flex; flex-direction: column; }

/* ── Individual Result Row ── */
.result-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #f1f5f9;
  transition: all 0.2s ease;
}
.result-row:hover { background: #f8fafc; }

/* Selected/active row */
.result-row.active {
  background: #f0fdf4;
  border: 1.5px solid #bbf7d0;
  border-radius: 0.75rem;
  margin: 0.375rem 0.75rem;
  padding: 1rem 1.25rem;
}

/* ── Domain Name (left column) ── */
.result-data {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}
.result-hostname {
  display: flex;
  align-items: baseline;
  font-weight: 600;
  font-size: 0.95rem;
  color: #1e293b;
  white-space: nowrap;
}
.result-sld { color: #1e293b; }
.result-tld { color: #64748b; font-weight: 500; }

/* ── Actions (status + period + button) ── */
.result-actions { display: contents; }
.result-row-details {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: flex-end;
}

/* ── Status Badges (clean, no bullets) ── */
.vh-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.vh-badge-available {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}
.vh-badge-taken {
  background: #f8fafc;
  color: #94a3b8;
  border: 1px solid #e2e8f0;
}
.vh-badge-premium {
  background: #fef3c7;
  color: #d97706;
  border: 1px solid #fde68a;
}
.vh-badge-transfer {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}
.vh-badge-free {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

/* Hint text for free domains in transfer mode */
.vh-domain-hint {
  font-size: 0.72rem;
  color: #94a3b8;
  font-style: italic;
}

/* ── Period Display ── */
.vh-domain-period {
  font-size: 0.8rem;
  color: #475569;
  white-space: nowrap;
  padding: 0.4rem 0.85rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: #fff;
  font-weight: 500;
}

/* ── WHOIS Link ── */
.result-whois-link {
  font-size: 0.8rem;
  color: #94a3b8;
  text-decoration: none;
  padding: 0.3rem 0.6rem;
  border-radius: 0.375rem;
  transition: all 0.15s;
  white-space: nowrap;
}
.result-whois-link:hover {
  color: #f97316;
  background: #fff7ed;
}

/* ── Transfer/Verhuizen Link (for taken domains) ── */
.vh-transfer-link {
  font-size: 0.8rem;
  color: #f97316;
  text-decoration: none;
  padding: 0.3rem 0.75rem;
  border: 1px solid #fed7aa;
  border-radius: 0.375rem;
  background: #fff7ed;
  transition: all 0.15s;
  white-space: nowrap;
  font-weight: 500;
}
.vh-transfer-link:hover {
  background: #f97316;
  color: #fff;
  border-color: #f97316;
}

/* Transfer price shown on taken domains */
.vh-transfer-price {
  font-size: 0.75rem;
  color: #64748b;
}

/* ── Login Popover ── */
.vh-login-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.vh-login-popover {
  background: #fff;
  border-radius: 1rem;
  padding: 1.75rem;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: vh-fadein 0.2s ease;
}
.vh-login-popover input:focus {
  border-color: #f97316;
  box-shadow: 0 0 0 3px rgba(249,115,22,0.1);
}
.vh-login-submit:hover {
  background: #ea580c !important;
}
@keyframes vh-fadein {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Cart Summary: domain delete button ── */
.cart-remove-domain {
  background: none;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  border-radius: 0.25rem;
}
.cart-remove-domain:hover {
  background: #fef2f2;
}

/* ── Active state for Verhuizen on taken domains ── */
.result-row.active .vh-transfer-link { display: none; }
.result-row.active .vh-badge-taken { display: none; }
.result-row.active .vh-badge-transfer { display: none; }
.result-row.active .vh-badge-free { display: none; }
.result-row.active .vh-domain-hint { display: none; }
.result-row.active .vh-transfer-price { display: none; }
.result-row.active .result-whois-link { display: none; }

/* ── Register / Transfer Buttons ── */
.domain-register,
.domain-transfer {
  display: inline-flex !important;
  align-items: center;
  gap: 0.375rem;
  padding: 0.4rem 1.1rem !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  color: #f97316 !important;
  background: #fff !important;
  border: 1.5px solid #f97316 !important;
  border-radius: 0.5rem !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  white-space: nowrap;
  line-height: 1.5 !important;
  position: relative;
}
.domain-register:hover,
.domain-transfer:hover {
  background: #f97316 !important;
  color: #fff !important;
}

/* Hide checkbox inside button */
.domain-register input[type="checkbox"],
.domain-transfer input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* Active/selected state */
.domain-register.active,
.domain-transfer.active,
.result-row.active .domain-register,
.result-row.active .domain-transfer {
  background: #f97316 !important;
  color: #fff !important;
}

/* ── In-Cart State ── */
.result-incart {
  display: none;
  align-items: center;
  gap: 0.5rem;
}
.result-row.active .result-incart { display: flex; }
.result-row.active .btn-group-toggle { display: none; }
.result-row.active .vh-badge-available { display: none; }
.result-row.active .vh-domain-period { display: none; }

.result-remove {
  color: #ef4444 !important;
  font-size: 0.8rem;
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0.25rem 0.5rem;
}
.result-remove:hover { text-decoration: underline; }

.result-cart {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  background: #22c55e;
  border: 1.5px solid #22c55e;
  border-radius: 0.5rem;
  pointer-events: none;
}

/* Hide noaction (we show badge instead) */
.domain-noaction { display: none !important; }

/* ── Loading ── */
.domain-loading {
  padding: 0.4rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: #f8fafc;
  pointer-events: none;
}
.cart_preloader { display: inline-flex; align-items: center; gap: 3px; }
.cart_preloader_line {
  width: 4px; height: 16px;
  background: #f97316;
  border-radius: 2px;
  animation: preloader-bounce 0.6s ease-in-out infinite;
}
.cart_preloader_line:nth-child(2) { animation-delay: 0.1s; }
.cart_preloader_line:nth-child(3) { animation-delay: 0.2s; }
@keyframes preloader-bounce {
  0%, 100% { transform: scaleY(0.5); opacity: 0.4; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* ── Lazy ── */
.result-row.lazy .result-actions { opacity: 0.3; }

/* ── Textarea ── */
.textarea-autoresize { resize: none; overflow: hidden; min-height: 48px; }

/* ── Responsive ── */
@media (max-width: 640px) {
  .vh-results-header { display: none; }
  .result-row { grid-template-columns: 1fr; gap: 0.5rem; padding: 0.75rem 1rem; }
  .result-row-details { flex-wrap: wrap; justify-content: flex-start; }
}


/* ============================================
   Bootstrap Compatibility Layer
   ============================================ */
.d-flex { display: flex !important; }
.d-none { display: none !important; }
.d-md-inline-block { display: none; }
@media (min-width: 768px) { .d-md-inline-block { display: inline-block !important; } }
.flex-row { flex-direction: row; }
.flex-column { flex-direction: column; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }

.m-3 { margin: 0.75rem; }
.mr-2 { margin-right: 0.5rem; }
.mr-3 { margin-right: 0.75rem; }
.mr-5 { margin-right: 1.25rem; }
.ml-2 { margin-left: 0.5rem; }
.mx-4 { margin-left: 1rem; margin-right: 1rem; }
.my-3 { margin-top: 0.75rem; margin-bottom: 0.75rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.p-4 { padding: 1rem; }

.font-weight-bold { font-weight: 700; }
.text-muted { color: #94a3b8; }
.text-primary { color: #f97316; }
.text-danger { color: #ef4444; }
.small { font-size: 0.75rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  line-height: 1.5;
}
.btn-sm { padding: 0.3rem 0.75rem; font-size: 0.8rem; }
.btn-primary { background: #f97316; color: #fff; border-color: #f97316; }
.btn-primary:hover { background: #ea580c; }
.btn-outline-primary { color: #f97316; border-color: #f97316; background: transparent; }
.btn-outline-primary:hover { background: #f97316; color: #fff; }
.btn-secondary { background: #e2e8f0; color: #94a3b8; border-color: #e2e8f0; cursor: default; }
.btn-link { background: none; border: none; padding: 0; }
.btn-rounded { border-radius: 9999px; }
.btn-border1px { border-width: 1.5px; }
.disabled { opacity: 0.5; pointer-events: none; }

.form-control {
  display: block; width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: #fff; color: #1e293b;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control:focus {
  outline: none;
  border-color: #f97316;
  box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.15);
}

.input-group { display: flex; }
.input-group-prepend, .input-group-append { display: flex; }
.input-group-text {
  display: flex; align-items: center;
  padding: 0.5rem 0.75rem; font-size: 0.875rem;
  background: #f8fafc; border: 1px solid #e2e8f0; color: #64748b;
}

.form-check { display: flex; align-items: center; gap: 0.5rem; }
.form-check-label { cursor: pointer; }

.badge { display: inline-flex; padding: 0.2rem 0.5rem; font-size: 0.7rem; font-weight: 600; border-radius: 9999px; }
.badge-warning { background: #fef3c7; color: #d97706; }

.border-bottom { border-bottom: 1px solid #f1f5f9; }
.w-100 { width: 100%; }

.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 0.75rem; text-align: left; }
.table-borderless th, .table-borderless td { border: none; }
.table-responsive { overflow-x: auto; }

.card { background: #fff; border: 1px solid #e2e8f0; border-radius: 0.75rem; }
.card-body { padding: 1.25rem; }
.card-header { padding: 0.75rem 1.25rem; border-bottom: 1px solid #e2e8f0; font-weight: 600; }
.shadow { box-shadow: 0 1px 3px rgba(0,0,0,0.1); }

.row { display: flex; flex-wrap: wrap; margin: -0.5rem; }
.col-12 { flex: 0 0 100%; max-width: 100%; padding: 0.5rem; }
.col-md-3 { padding: 0.5rem; }
.col-md-4 { padding: 0.5rem; }
.col-md-8 { padding: 0.5rem; }
@media (min-width: 768px) {
  .col-md-3 { flex: 0 0 25%; max-width: 25%; }
  .col-md-4 { flex: 0 0 33.333%; max-width: 33.333%; }
  .col-md-8 { flex: 0 0 66.666%; max-width: 66.666%; }
}

.btn-outline-light.active {
  background: rgba(255,255,255,0.15) !important;
  border-color: rgba(255,255,255,0.4) !important;
}
