/*
 * HostPika WHMCS Custom Theme
 * Matches hostpika.com brand identity
 * Purple-Blue gradient design system
 */

/* =============================
   GOOGLE FONTS
   ============================= */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

/* =============================
   CSS VARIABLES
   ============================= */
:root {
  --hp-purple: #7351FB;
  --hp-blue: #2662D9;
  --hp-gradient: linear-gradient(135deg, #7351FB 0%, #2662D9 100%);
  --hp-gradient-hover: linear-gradient(135deg, #6340ea 0%, #1d52c8 100%);
  --hp-dark: #0f172a;
  --hp-dark-secondary: #1e293b;
  --hp-text: #f8fafc;
  --hp-text-muted: rgba(248, 250, 252, 0.7);
  --hp-border: rgba(255, 255, 255, 0.12);
  --hp-glass: rgba(255, 255, 255, 0.05);
}

/* =============================
   GLOBAL FONT
   ============================= */
body, h1, h2, h3, h4, h5, h6, p, a, button, input, select, textarea {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

/* =============================
   PAGE BACKGROUND
   ============================= */
body.primary-bg-color {
  background-color: #f0f4ff !important;
}

/* =============================
   HEADER — FULL REDESIGN
   ============================= */
header.header {
  background: #ffffff !important;
  box-shadow: 0 1px 20px rgba(115, 81, 251, 0.12) !important;
  border-bottom: 2px solid transparent;
  border-image: var(--hp-gradient) 1;
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* Topbar (logged-in user bar) — gradient bg, ALL text must be white */
header.header .topbar {
  background: var(--hp-gradient) !important;
  color: #ffffff !important;
  padding: 4px 0 !important;
  font-size: 0.82rem;
}
/* Every element inside topbar forced white — fix colour mixing */
header.header .topbar *,
header.header .topbar a,
header.header .topbar a:hover,
header.header .topbar .btn,
header.header .topbar button {
  color: #ffffff !important;
  text-decoration: none !important;
}
header.header .topbar .active-client .input-group-text {
  color: rgba(255,255,255,0.75) !important;
  background-color: transparent !important;
  border: 0 !important;
  font-size: 0.8rem !important;
}
header.header .topbar .btn-active-client span {
  border-bottom: 1px dashed rgba(255,255,255,0.55) !important;
  color: #ffffff !important;
  font-weight: 500;
}
header.header .topbar .btn-active-client {
  background: rgba(255,255,255,0.1) !important;
  border-radius: 6px;
  padding: 2px 10px !important;
}
header.header .topbar .btn-active-client:hover {
  background: rgba(255,255,255,0.2) !important;
}
/* Notification / flag button */
header.header .topbar #accountNotifications {
  background: transparent !important;
  border: 1px solid rgba(255,255,255,0.25) !important;
  border-radius: 6px;
  padding: 2px 10px !important;
}

/* Navbar Logo Area */
header.header .navbar-brand {
  font-weight: 700;
  font-size: 1.4rem;
  background: var(--hp-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
header.header .logo-img {
  max-height: 44px !important;
  max-width: 180px !important;
}

/* Main Navigation Links */
header.header .navbar a,
header.header .navbar-nav a {
  color: #334155 !important;
  font-weight: 500;
  font-size: 14px !important;
  transition: color 0.2s ease;
}
header.header .navbar a:hover,
header.header .navbar-nav a:hover {
  color: var(--hp-purple) !important;
  text-decoration: none !important;
}

/* Active/Current page nav link */
header.header .nav-item.active > a {
  color: var(--hp-purple) !important;
  font-weight: 600;
}

/* Navbar wrapper */
header.header .main-navbar-wrapper {
  border-top: 1px solid #f1f5f9;
}

/* Cart Button */
header.header .toolbar .nav-link.cart-btn {
  background: transparent !important;
  border: 1.5px solid #e2e8f0 !important;
  color: #475569 !important;
  border-radius: 8px !important;
  transition: all 0.2s ease;
}
header.header .toolbar .nav-link.cart-btn:hover {
  background: var(--hp-gradient) !important;
  border-color: transparent !important;
  color: #fff !important;
}
header.header .toolbar .nav-link .badge {
  background: var(--hp-purple) !important;
}

/* Search bar */
header.header .search {
  border: 1.5px solid #e2e8f0 !important;
  border-radius: 10px !important;
  transition: border-color 0.2s ease;
}
header.header .search:focus-within {
  border-color: var(--hp-purple) !important;
  box-shadow: 0 0 0 3px rgba(115, 81, 251, 0.12);
}

/* Hamburger menu button */
header.header .btn[data-toggle="collapse"] {
  color: var(--hp-purple) !important;
}

/* Dropdown menu */
header.header .dropdown-menu {
  border: 1px solid #f1f5f9;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  padding: 6px;
}
header.header .dropdown-item.active,
header.header .dropdown-item:active {
  background: var(--hp-gradient) !important;
  color: #fff !important;
  border-radius: 8px;
}
header.header .dropdown-item:hover {
  background-color: rgba(115, 81, 251, 0.08) !important;
  color: var(--hp-purple) !important;
  border-radius: 8px;
}

/* =============================
   LANGUAGE / CURRENCY IN HEADER
   ============================= */
.hp-header-locale-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: transparent;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  color: #475569 !important;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none !important;
  white-space: nowrap;
  font-family: 'Outfit', sans-serif;
}
.hp-header-locale-btn:hover {
  border-color: var(--hp-purple);
  color: var(--hp-purple) !important;
  background: rgba(115, 81, 251, 0.06);
}
.hp-header-locale-btn .iti-flag {
  display: inline-block;
  vertical-align: middle;
}
.hp-header-locale-btn i {
  font-size: 12px;
  opacity: 0.6;
}

/* =============================
   PRIMARY BUTTON (ORDER / SUBMIT)
   ============================= */
.btn-primary {
  background: var(--hp-gradient) !important;
  border: none !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  letter-spacing: 0.01em;
  transition: opacity 0.2s ease, transform 0.1s ease !important;
  box-shadow: 0 4px 14px rgba(115, 81, 251, 0.3) !important;
}
.btn-primary:hover {
  opacity: 0.9 !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(115, 81, 251, 0.4) !important;
}
.btn-primary:active {
  transform: translateY(0);
}

/* Secondary button */
.btn-success {
  background: var(--hp-gradient) !important;
  border: none !important;
  border-radius: 8px !important;
}

/* =============================
   CARDS
   ============================= */
.card {
  border: 1px solid #e2e8f0 !important;
  border-radius: 14px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover {
  box-shadow: 0 8px 24px rgba(115, 81, 251, 0.12) !important;
}
.card-header {
  background: linear-gradient(135deg, rgba(115, 81, 251, 0.06), rgba(38, 98, 217, 0.06)) !important;
  border-bottom: 1px solid #e2e8f0 !important;
  border-radius: 14px 14px 0 0 !important;
  font-weight: 600;
  color: #1e293b;
}

/* =============================
   BREADCRUMB
   ============================= */
.master-breadcrumb {
  background: linear-gradient(90deg, rgba(115, 81, 251, 0.06), rgba(38, 98, 217, 0.04)) !important;
  border-bottom: 1px solid #e2e8f0;
}
.master-breadcrumb .breadcrumb-item a {
  color: var(--hp-purple) !important;
}
.master-breadcrumb .breadcrumb-item.active {
  color: #64748b !important;
}

/* =============================
   FOOTER — MINIMAL MODERN DESIGN
   ============================= */
footer.footer {
  background: linear-gradient(135deg, #7351FB 0%, #2662D9 100%) !important;
  padding: 24px 0 !important;
  border-top: none !important;
  border-image: none !important;
  margin-top: 40px;
}
footer.footer .copyright {
  color: rgba(255, 255, 255, 0.85) !important;
  font-size: 0.85rem !important;
  text-align: center !important;
  margin: 0 !important;
  font-weight: 400;
  letter-spacing: 0.01em;
}
footer.footer p.copyright {
  color: rgba(255, 255, 255, 0.85) !important;
  font-size: 0.85rem !important;
  text-align: center !important;
}


/* =============================
   SIDEBAR
   ============================= */
.sidebar .panel-heading,
.sidebar .card-header {
  background: var(--hp-gradient) !important;
  color: #fff !important;
  border-radius: 10px 10px 0 0 !important;
}
/* Sidebar card-header title and icon color */
.sidebar .card-header .card-title,
.sidebar .card-header h3,
.sidebar .card-header i {
  color: #fff !important;
}
.sidebar .list-group-item.active {
  background: var(--hp-gradient) !important;
  border-color: transparent !important;
  color: #fff !important;
}
.sidebar .list-group-item:hover {
  background-color: rgba(115, 81, 251, 0.07) !important;
  color: var(--hp-purple) !important;
}

/* ─── Sidebar Footer Buttons (Your Info Update, New Contact, etc.) ─── */
.sidebar .card-footer {
  background: transparent !important;
  border-top: 1px solid rgba(115, 81, 251, 0.12) !important;
  padding: 10px 15px !important;
}
.sidebar .card-footer .btn,
.sidebar .card-footer a.btn,
.sidebar .card-footer button {
  display: block !important;
  width: 100% !important;
  background: var(--hp-gradient) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  padding: 8px 16px !important;
  text-align: center !important;
  text-decoration: none !important;
  box-shadow: 0 3px 10px rgba(115, 81, 251, 0.3) !important;
  transition: opacity 0.2s ease, transform 0.1s ease !important;
  cursor: pointer !important;
}
.sidebar .card-footer .btn:hover,
.sidebar .card-footer a.btn:hover,
.sidebar .card-footer button:hover {
  opacity: 0.88 !important;
  transform: translateY(-1px);
  color: #ffffff !important;
}
/* Specifically fix the blank/default styled buttons in card-body too */
.sidebar .card-body .btn,
.sidebar .card-body a.btn {
  background: var(--hp-gradient) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  box-shadow: 0 3px 10px rgba(115, 81, 251, 0.25) !important;
}
.sidebar .card-body .btn:hover,
.sidebar .card-body a.btn:hover {
  opacity: 0.88 !important;
  color: #ffffff !important;
}


/* =============================
   LINKS — cascade approach
   ============================= */
/* Global default */
a {
  color: var(--hp-purple) !important;
}
a:hover {
  color: var(--hp-blue) !important;
}
/* Topbar overrides (gradient bg — must be white) */
header.header .topbar a,
header.header .topbar a:visited,
header.header .topbar a:hover,
header.header .topbar a:focus {
  color: #ffffff !important;
  text-decoration: none !important;
}
/* Footer — white text on gradient bg */
footer.footer a,
footer.footer a:visited,
footer.footer a:hover {
  color: rgba(255, 255, 255, 0.85) !important;
  text-decoration: none !important;
}


/* =============================
   PAGINATION
   ============================= */
.page-item.active .page-link {
  background: var(--hp-gradient) !important;
  border-color: transparent !important;
}
.page-link {
  color: var(--hp-purple) !important;
}
.page-link:hover {
  color: var(--hp-blue) !important;
}

/* =============================
   BADGE / LABELS
   ============================= */
.badge-info {
  background: var(--hp-gradient) !important;
}
.badge-primary {
  background: var(--hp-gradient) !important;
}
.badge-success {
  background: linear-gradient(135deg, #10b981, #059669) !important;
}

/* =============================
   ALERTS / NOTIFICATIONS
   ============================= */
.alert-info {
  background-color: rgba(115, 81, 251, 0.08) !important;
  border-color: rgba(115, 81, 251, 0.2) !important;
  color: var(--hp-purple) !important;
}

/* =============================
   DOMAIN SEARCH HERO
   ============================= */
.domain-hero,
#domain-search,
.domain-search-container {
  background: var(--hp-gradient) !important;
}

/* =============================
   PROGRESS BARS
   ============================= */
.progress-bar {
  background: var(--hp-gradient) !important;
}

/* =============================
   TABLES
   ============================= */
.table thead th {
  background: linear-gradient(135deg, rgba(115, 81, 251, 0.06), rgba(38, 98, 217, 0.06)) !important;
  color: #1e293b;
  font-weight: 600;
  border-bottom: 2px solid rgba(115, 81, 251, 0.2) !important;
}
.table-list > tbody > tr:hover > td {
  background-color: rgba(115, 81, 251, 0.04) !important;
}

/* =============================
   MODAL
   ============================= */
.modal-header {
  background: var(--hp-gradient) !important;
  color: #fff !important;
}
.modal-header .close {
  color: #fff !important;
  opacity: 0.8;
}
.modal-header .modal-title {
  color: #fff !important;
}

/* =============================
   SEARCH BOX — HIDE FOR EVERYONE
   (desktop top search + mobile collapse search)
   ============================= */
/* Desktop top search (d-none d-xl-flex — but we fully hide it) */
header.header .navbar .form-inline.ml-auto,
header.header .navbar .search.d-none.d-xl-flex {
  display: none !important;
}
/* Mobile collapse search form */
header.header .main-navbar-wrapper .d-xl-none.mb-2 {
  display: none !important;
}
/* Hide the whole search form block in mobile navbar */
#mainNavbar > form {
  display: none !important;
}

/* =============================
   GUEST: HIDE PRIMARY NAV ITEMS
   Uses Smarty-injected class on <body>
   header.tpl: class="...{if !$loggedin} guest-view{/if}"
   — No JS needed, works server-side
   ============================= */
body.guest-view #mainNavbar ul#nav {
  display: none !important;
}
/* Note: secondary nav (Account → Login/Register) stays VISIBLE for guests
   so they can find the login link */


/* =============================
   SCROLLBAR CUSTOM
   ============================= */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: var(--hp-gradient);
  border-radius: 10px;
}

/* =============================
   SMOOTH TRANSITIONS
   ============================= */
* {
  transition-property: background-color, border-color, color, box-shadow;
  transition-duration: 0.15s;
  transition-timing-function: ease;
}
button, a, .btn {
  transition: all 0.2s ease !important;
}
