/* ninjax-product-details.css
   NINJAX-styled Product Details / Service page
   Scope: targets the standard WHMCS productdetails markup
*/

/* theme variables (match homepage) */
.nx-prod,
.nx-prod * { box-sizing: border-box; }

.nx-prod {
  --nx-purple: #6d28d9;
  --nx-purple-600: #5b21b6;
  --nx-purple-700: #4c1d95;
  --nx-blue-600: #2563eb;
  --nx-text: #101114;
  --nx-muted: #2b2d31;
  --nx-soft: #6b7280;
  --nx-stroke: rgba(109,40,217,0.14);
  color: var(--nx-text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Alerts ---------- */
.nx-prod .alert {
  border-radius: 10px;
  padding: 14px 16px;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(11,12,14,0.03);
  border: 1px solid rgba(16,17,20,0.03);
}
.nx-prod .alert-danger {
  background: linear-gradient(90deg, rgba(239,68,68,0.06), rgba(249,115,22,0.03));
  border-color: rgba(239,68,68,0.10);
  color: #7f1d1d;
}
.nx-prod .alert-warning {
  background: linear-gradient(90deg, rgba(245,158,11,0.06), rgba(250,204,21,0.03));
  border-color: rgba(245,158,11,0.10);
  color: #663d00;
}
.nx-prod .alert-success {
  background: linear-gradient(90deg, rgba(34,197,94,0.06), rgba(16,185,129,0.03));
  border-color: rgba(16,185,129,0.10);
  color: #064e3b;
}
.nx-prod .alert .btn { font-weight: 800; }

/* ---------- Product status block ---------- */
.product-status {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(245,246,249,0.98));
  border: 1px solid var(--nx-stroke);
  box-shadow: 0 14px 30px rgba(16,17,20,0.04);
  margin-bottom: 18px;
}
.product-icon { flex: 0 0 160px; }
.product-icon .fa-stack { font-size: 38px; color: var(--nx-purple-700); }
.product-icon h3 { margin: 8px 0 0; font-size: 20px; font-weight: 900; }
.product-icon h4 { margin: 4px 0 0; font-size: 14px; color: var(--nx-soft); font-weight: 700; }

/* status text */
.product-status-text {
  font-weight: 800;
  font-size: 14px;
  color: var(--nx-muted);
  padding: 8px 12px;
  align-self: flex-start;
  border-radius: 10px;
  margin-left: auto;
  background: linear-gradient(90deg, rgba(109,40,217,0.04), rgba(37,99,235,0.02));
  border: 1px solid rgba(109,40,217,0.06);
}

/* different state classes */
.product-status-terminated { opacity: 0.65; filter: grayscale(10%); }
.product-status-active .product-status-text { background: linear-gradient(90deg, rgba(16,185,129,0.08), rgba(34,197,94,0.03)); border-color: rgba(16,185,129,0.08); color: #064e3b; }

/* ---------- Product action buttons ---------- */
.product-actions-wrapper { margin-top: 10px; display: grid; gap: 10px; }
.product-actions-wrapper .btn {
  border-radius: 999px;
  padding: 12px 14px;
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(16,17,20,0.05);
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}
.product-actions-wrapper .btn:hover { transform: translateY(-3px); }

/* Primary / success / danger */
.product-actions-wrapper .btn-primary {
  background: linear-gradient(90deg, var(--nx-purple-700), var(--nx-blue-600));
  color: #fff;
  border: none;
}
.product-actions-wrapper .btn-success {
  background: linear-gradient(90deg, #10b981, #06b6d4);
  color: #fff;
  border: none;
}
.product-actions-wrapper .btn-danger {
  background: linear-gradient(90deg, #ef4444, #f97316);
  color: #fff;
  border: none;
}
.product-actions-wrapper .btn:disabled,
.product-actions-wrapper .btn.disabled {
  opacity: 0.5; pointer-events: none; transform: none;
}

/* ---------- Tab navigation ---------- */
.nav-tabs.responsive-tabs-sm {
  border-bottom: 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.nav-tabs.responsive-tabs-sm .nav-item .nav-link {
  border: none;
  background: transparent;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 800;
  color: var(--nx-muted);
}
.nav-tabs.responsive-tabs-sm .nav-link.active {
  background: linear-gradient(90deg, rgba(109,40,217,0.10), rgba(37,99,235,0.06));
  color: var(--nx-text);
  box-shadow: 0 10px 26px rgba(37,99,235,0.06);
}

/* connector under tabs (thin accent) */
.responsive-tabs-sm-connector .channel {
  height: 4px;
  width: 100%;
  background: linear-gradient(90deg, rgba(109,40,217,0.08), rgba(37,99,235,0.05));
  border-radius: 999px;
  margin-bottom: 8px;
}

/* tab content area */
.product-details-tab-container {
  border-radius: 12px;
  padding: 14px;
  border: 1px solid rgba(16,17,20,0.03);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(249,250,251,0.98));
  box-shadow: 0 12px 30px rgba(16,17,20,0.03);
}

/* ---------- List-group inside cards ---------- */
.list-group .list-group-item {
  border: none;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(16,17,20,0.03);
  border-radius: 8px;
  font-weight: 700;
  background: transparent;
}
.list-group .list-group-item:last-child { border-bottom: none; }
.list-group .list-group-item.active {
  background: linear-gradient(90deg, rgba(109,40,217,0.06), rgba(37,99,235,0.04));
  color: var(--nx-text);
}

/* ---------- Module client area (third-party module output) ---------- */
.module-client-area {
  padding: 16px;
  border-radius: 10px;
  border: 1px dashed rgba(16,17,20,0.04);
  background: rgba(245,246,249,0.6);
  color: var(--nx-muted);
}

/* ---------- Downloads & Addons card variants ---------- */
.card.card-accent-blue { border-color: rgba(37,99,235,0.12); }
.card.card-accent-green { border-color: rgba(16,185,129,0.12); }
.card.card-accent-red { border-color: rgba(239,68,68,0.12); }

/* card header/footer */
.card .card-header {
  background: transparent;
  border-bottom: 1px solid rgba(16,17,20,0.03);
  padding: 12px 16px;
  font-weight: 800;
}
.card .card-footer {
  background: transparent;
  border-top: 1px solid rgba(16,17,20,0.03);
  padding: 10px 16px;
}

/* ---------- Forms on page (password change) ---------- */
.using-password-strength .form-control {
  border-radius: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(16,17,20,0.06);
  box-shadow: none;
}
.using-password-strength .generate-password {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--nx-purple-700), var(--nx-blue-600));
  color: #fff;
  font-weight: 800;
  border: none;
  padding: 10px 12px;
}

/* ---------- Knob usage (resource usage) ---------- */
/* center knob container and provide spacing */
.dial-usage { display: inline-block; margin: 0 auto 8px; }
#ssl-info .alert { margin-top: 12px; }

/* ---------- Small utility tweaks ---------- */
.text-center.module-client-area iframe,
.text-center.module-client-area embed { max-width: 100%; }

/* focus outlines for accessibility */
.nx-prod a:focus,
.nx-prod button:focus,
.nx-prod .list-group .list-group-item:focus {
  outline: 3px solid rgba(37,99,235,0.14);
  outline-offset: 3px;
}

/* responsive adjustments */
@media (max-width: 768px) {
  .product-status { flex-direction: column; align-items: center; text-align: center; }
  .product-status .product-status-text { margin-left: 0; margin-top: 8px; }
  .product-actions-wrapper { grid-template-columns: 1fr; }
  .nav-tabs.responsive-tabs-sm { justify-content: flex-start; overflow-x: auto; padding-bottom: 8px; }
}
