/* ICOREHOST WHMCS theme alignment (twenty-one custom.css)
   This file aligns WHMCS visuals with the root site's branding without altering core templates.
   - Fonts: Poppins
   - Primary color: #012e57 (from site theme-color)
   - Buttons/links/headers adjusted to match
   - Logo handling: use WHMCS logo setting or CSS fallback
*/

/* Import brand font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
/* Import root site CSS for structural styles to match header/footer */
@import url('/assets/css/style.css');

:root {
  /* brand colors */
  --icorehost-primary: #012e57;
  --icorehost-primary-contrast: #ffffff;
}

/* Typography */
html, body {
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, 'Helvetica Neue', Arial, 'Noto Sans', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', sans-serif !important;
  color: #1f2a37; /* readable dark text */
  font-size: 0.95rem; /* slightly smaller for compact look */
  line-height: 1.5;
}
/* Force readable base regardless of legacy classes */
body, body.primary-bg-color { background: #ffffff !important; color: #1f2a37 !important; }

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  color: #0f172a;
}
/* Tame heading sizes to avoid oversized elements */
h1 { font-size: 1.8rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

/* Primary buttons */
.btn-primary,
.btn-info,
.badge-info,
.btn.btn-default.primary-bg-color,
/* remove broad primary-bg-color override to prevent text color issues */
.header .toolbar .cart-btn .badge.badge-info {
  background-color: var(--icorehost-primary) !important;
  border-color: var(--icorehost-primary) !important;
  color: var(--icorehost-primary-contrast) !important;
}

.btn-primary:hover,
.btn-info:hover {
  filter: brightness(0.9);
}

/* Links */
a,
.navbar-light .navbar-nav .nav-link,
.main-navbar-wrapper .navbar-nav .nav-link {
  color: var(--icorehost-primary);
}

a:hover,
.navbar-light .navbar-nav .nav-link:hover,
.main-navbar-wrapper .navbar-nav .nav-link:hover {
  color: #024076; /* slightly lighter */
}

/* Header spacing and logo treatment */
#header .navbar { background: #ffffff; }
#header .navbar-brand .logo-img { max-height: 32px; }
/* Top bar styles */
.top-bar { background:#f7f9fc; border-bottom:1px solid #e6ecf2; position:relative; z-index:1030; }
.top-bar a { color:#012e57; }
.top-bar .contact-info { color:#012e57; }

/* If no logo image is set in WHMCS settings, replace text with brand image */
#header .navbar-brand {
  position: relative;
  display: flex;
  align-items: center;
}
#header .navbar-brand:not(:has(img)) {
  font-size: 0; /* hide text */
  width: 180px;
  height: 40px;
  background-image: url('/assets/img/iCOREHOST Logo.svg');
  background-repeat: no-repeat;
  background-position: left center;
  background-size: contain;
}

/* Buttons subtle rounding like root */
.btn { border-radius: 8px; font-size: 0.9rem; padding: 0.45rem 0.85rem; }

/* Cards and panels */
.card, .panel, .tile, .list-group-item {
  border-radius: 12px;
}
.card .card-body, .panel .panel-body { padding: 0.875rem; }
.card .card-header, .panel .panel-heading { padding: 0.75rem 0.875rem; }

/* Domain search bar on WHMCS homepage */
#whmcs-domain-search .domain-input-group .form-control {
  border-radius: 10px 0 0 10px;
}
#whmcs-domain-search .domain-input-group .btn {
  border-radius: 0 10px 10px 0;
  background: var(--icorehost-primary);
  border-color: var(--icorehost-primary);
}

/* Footer styles closer to root */
footer#footer, .main-footer { background: #0b1c2b; color: #e9eef5; }
footer#footer a, .main-footer a { color: #b9d4ff; }
footer#footer a:hover, .main-footer a:hover { color: #ffffff; }

/* Tweak alerts to brand */
.alert-info { background-color: #e6f0ff; color: #012e57; }

/* Form focus color */
.form-control:focus {
  border-color: var(--icorehost-primary);
  box-shadow: 0 0 0 0.2rem rgba(1, 46, 87, 0.15);
}

/* Order form (Standard Cart) styling */
/* Buttons on cart/checkout */
.btn-success,
.btn-checkout,
#btnCompleteOrder,
#btnContinue { background-color: var(--icorehost-primary) !important; border-color: var(--icorehost-primary) !important; }
.btn-success:hover,
.btn-checkout:hover,
#btnCompleteOrder:hover,
#btnContinue:hover { filter: brightness(0.9); }

/* Panels & cards */
.panel-primary > .panel-heading,
.card-primary .card-header,
.order-summary .summary-container .header { background: var(--icorehost-primary) !important; color: #fff !important; }

/* Price accents */
.order-summary .total-due .amt,
.product .price,
.product .price .amt { color: var(--icorehost-primary) !important; }

/* Tables */
.table thead th { border-bottom-color: rgba(1,46,87,0.2); }
.table-striped tbody tr:nth-of-type(odd) { background-color: #f7f9fc; }

/* Pills/tabs */
.nav-pills .nav-link.active, .nav-pills .show > .nav-link { background: var(--icorehost-primary); }

/* Domain checker in cart */
#domainLoading .loading,
.domainresults .available strong { color: var(--icorehost-primary); }

/* Inputs */
.input-group .input-group-prepend .btn-default,
.input-group .input-group-append .btn-default { border-color: var(--icorehost-primary); color: var(--icorehost-primary); }
