/*
 * Spongy Donuts — "Warm Cyber-Glass" WHMCS 9.1 Child Theme Stylesheet
 * Upload to: /clients/templates/spongydonuts-twenty-one/css/custom.css
 * Compatible with WHMCS 9.1 (Twenty-One parent theme)
 */

:root {
  --sd-bg: #FAF7F2;
  --sd-glass: rgba(255, 255, 255, 0.94);
  --sd-border: rgba(140, 80, 36, 0.20);
  --sd-text: #18120E;
  --sd-muted: #4A3525;
  --sd-primary: #8C5024;
  --sd-caramel: #B8732A;
}

body,
body.primary-bg-color {
  background-color: var(--sd-bg) !important;
  background-image:
    radial-gradient(circle at 15% 10%, rgba(212, 139, 56, 0.16) 0%, transparent 42%),
    radial-gradient(circle at 88% 18%, rgba(140, 80, 36, 0.12) 0%, transparent 45%),
    linear-gradient(to right, rgba(31, 22, 16, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(31, 22, 16, 0.045) 1px, transparent 1px) !important;
  background-size: 100% 100%, 100% 100%, 36px 36px, 36px 36px !important;
  color: var(--sd-text) !important;
}

/* Hide public Store, Knowledgebase Search Bar, Cart Icon, Domain Search, and default dark WHMCS footer */
.home-banner,
.card-columns.home-kb-cats,
#announcements,
.announcements-list,
header.header form[action*="knowledgebase"],
header.header .search,
header.header a[href*="cart.php"],
header.header #cartItemCount,
a[href*="rp=/store"],
a[href*="cart.php?a=add&domain=register"],
a[href*="cart.php?a=add&domain=transfer"],
#Secondary_Sidebar-Client_Shortcuts-Order_New_Services,
#Secondary_Sidebar-Actions-Domain_Registration,
#Secondary_Sidebar-My_Domains_Actions-Register_a_New_Domain,
#Secondary_Sidebar-My_Domains_Actions-Transfer_a_Domain_to_Us,
footer#footer.footer,
footer.footer {
  display: none !important;
}

/* Frosted Header — high z-index so dropdown menus never get hidden behind page content */
header.header,
#header {
  position: relative !important;
  z-index: 1050 !important;
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(16px) !important;
  border-bottom: 1px solid var(--sd-border) !important;
  box-shadow: 0 12px 35px -10px rgba(24, 18, 14, 0.08) !important;
  overflow: visible !important;
}

.navbar-main,
#main-menu {
  position: relative !important;
  z-index: 1055 !important;
  background: transparent !important;
  overflow: visible !important;
}

header.header .dropdown-menu,
.navbar-main .dropdown-menu {
  z-index: 1060 !important;
  background: #FFFFFF !important;
  border: 1px solid var(--sd-border) !important;
  border-radius: 14px !important;
  box-shadow: 0 18px 40px -10px rgba(24, 18, 14, 0.18) !important;
  padding: 0.5rem 0 !important;
}

header.header .dropdown-item:hover,
.navbar-main .dropdown-item:hover {
  background-color: rgba(184, 115, 42, 0.10) !important;
  color: var(--sd-primary) !important;
}

/* Ensure main body stays below header dropdowns */
section#main-body,
.main-body {
  position: relative !important;
  z-index: 1 !important;
  min-height: 62vh !important;
}

/* Tone down WHMCS branded attribution line so it stays present/clickable but visually subtle */
p:has(> a[href*="whmcs.com"]),
.sd-whmcs-subtle-brand {
  font-size: 9px !important;
  line-height: 1.2 !important;
  color: #C8BCAE !important;
  opacity: 0.25 !important;
  margin-top: 2.5rem !important;
  margin-bottom: 0.25rem !important;
  letter-spacing: 0.02em !important;
}

p:has(> a[href*="whmcs.com"]) a,
.sd-whmcs-subtle-brand a,
a[href*="whmcs.com"] {
  color: #C8BCAE !important;
  text-decoration: none !important;
  font-weight: 400 !important;
}

/* Cards & Login Container */
.card,
.panel,
.tile {
  background: var(--sd-glass) !important;
  border: 1px solid var(--sd-border) !important;
  border-radius: 20px !important;
  box-shadow: 0 20px 50px -15px rgba(24, 18, 14, 0.10) !important;
}

/* Buttons */
.btn-primary,
.bg-primary {
  background: linear-gradient(90deg, #8C5024 0%, #B8732A 100%) !important;
  border-color: #8C5024 !important;
  color: #FFFFFF !important;
  border-radius: 12px !important;
  font-weight: 700 !important;
}

/* Exact PayPal NCP Button Class (ID: 6CHH5RTMMQJ4N) */
.pp-6CHH5RTMMQJ4N {
  text-align: center;
  border: none;
  border-radius: 0.25rem;
  min-width: 11.625rem;
  padding: 0 2rem;
  height: 2.625rem;
  font-weight: bold;
  background-color: #FFD140;
  color: #000000;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.25rem;
  cursor: pointer;
}

/* Spongy Donuts Custom WHMCS Footer Bar */
.sd-whmcs-footer {
  width: 100%;
  margin-top: 3.5rem;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid rgba(140, 80, 36, 0.22);
  box-shadow: 0 -10px 30px -10px rgba(24, 18, 14, 0.06);
  padding: 2rem 0;
  color: #4A3525;
  font-size: 0.875rem;
}

.sd-whmcs-footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: 1.2fr auto 1.2fr;
  align-items: center;
  gap: 2rem;
}

.sd-whmcs-footer-brand {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  text-align: left;
}

.sd-whmcs-footer-brand img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
  margin-top: 2px;
}

.sd-whmcs-footer-quickpay {
  background: #FAF7F2;
  border: 1px solid rgba(140, 80, 36, 0.20);
  border-radius: 14px;
  padding: 0.85rem 1.35rem;
  text-align: center;
}

.sd-whmcs-footer-links {
  text-align: right;
}

.sd-whmcs-footer-nav {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem 0.85rem;
  margin-bottom: 0.45rem;
  font-weight: 700;
}

.sd-whmcs-footer-nav a {
  color: #8C5024;
  text-decoration: none;
}

.sd-whmcs-footer-nav a:hover {
  text-decoration: underline;
}

@media (max-width: 900px) {
  .sd-whmcs-footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1.5rem;
  }
  .sd-whmcs-footer-brand {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .sd-whmcs-footer-links {
    text-align: center;
  }
  .sd-whmcs-footer-nav {
    justify-content: center;
  }
}
