/* Header/footer chrome — loaded last (overrides Tailwind on panel pages) */

html,
body.bhost-body {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

html {
  background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 50%, #0f1329 100%);
  --bhost-vv-offset: 0px;
}

html::-webkit-scrollbar,
body.bhost-body::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
}

.bhost-body {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  position: relative;
}

.bhost-body > .header {
  flex-shrink: 0;
  background:
    radial-gradient(ellipse 90% 140% at 50% -40%, rgba(108, 99, 255, 0.16) 0%, transparent 52%),
    radial-gradient(ellipse 50% 80% at 88% 0%, rgba(74, 120, 255, 0.1) 0%, transparent 50%),
    linear-gradient(
      180deg,
      rgba(30, 33, 54, 0.78) 0%,
      rgba(26, 31, 58, 0.65) 50%,
      rgba(20, 24, 45, 0.42) 100%
    );
  backdrop-filter: blur(20px) saturate(1.12);
  -webkit-backdrop-filter: blur(20px) saturate(1.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 1px 0 rgba(108, 99, 255, 0.08);
}

.bhost-body--panel > .header,
.bhost-body--public > .header,
.bhost-body--auth > .header {
  position: fixed !important;
  top: var(--bhost-vv-offset, 0px);
  left: 0;
  right: 0;
  width: 100%;
  z-index: 100;
  height: calc(var(--bhost-header-h) + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  box-sizing: border-box;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.bhost-body--panel > .bhost-panel-viewport {
  padding-top: calc(var(--bhost-header-h) + env(safe-area-inset-top, 0px) + var(--bhost-vv-offset, 0px));
}

.bhost-body--public > .bhost-main,
.bhost-body--auth > .bhost-auth-wrap {
  padding-top: calc(var(--bhost-header-h) + env(safe-area-inset-top, 0px) + var(--bhost-vv-offset, 0px));
}

.bhost-body--panel > .header,
.bhost-body--public > .header,
.bhost-body--auth > .header {
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 120% at 50% -30%, rgba(108, 99, 255, 0.14) 0%, transparent 55%),
    linear-gradient(
      180deg,
      rgba(30, 33, 54, 0.96) 0%,
      rgba(26, 31, 58, 0.94) 100%
    ) !important;
}

.bhost-body--panel .header .inner.container,
.bhost-body--public .header .inner.container,
.bhost-body--auth .header .inner.container {
  height: var(--bhost-header-h);
  min-height: var(--bhost-header-h);
  max-height: var(--bhost-header-h);
  padding-top: 0;
  padding-bottom: 0;
  align-items: center;
  flex-wrap: nowrap;
  box-sizing: border-box;
}

.bhost-body--panel .header .brand-2,
.bhost-body--public .header .brand-2,
.bhost-body--auth .header .brand-2 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bhost-body > .bhost-main,
.bhost-body > .bhost-panel-viewport,
.bhost-body > .bhost-auth-wrap {
  flex: 1 1 auto;
  width: 100%;
}

.bhost-body > .footer {
  flex-shrink: 0;
  margin-top: auto;
  width: 100%;
  background: #050816;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 40px 0 36px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.bhost-body > .footer .container {
  width: 100%;
  max-width: var(--bhost-layout-max, var(--bhost-site-max, 1720px));
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--bhost-layout-gutter, var(--bhost-site-gutter, 36px));
  padding-right: var(--bhost-layout-gutter, var(--bhost-site-gutter, 36px));
  box-sizing: border-box;
}

.bhost-body > .footer .footer-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px 40px;
  width: 100%;
}

.bhost-body > .footer .footer-brand {
  flex: 0 1 380px;
  max-width: 420px;
  min-width: 260px;
}

.bhost-body > .footer .footer-section {
  flex: 0 0 auto;
  min-width: 148px;
}

.bhost-body > .footer .footer-brand a,
.bhost-body > .footer .footer-brand-static {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 14px;
}

.bhost-body > .footer .footer-brand-static {
  cursor: default;
  user-select: none;
}

.bhost-body > .footer .footer-brand__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.bhost-body > .footer .footer-brand__name {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
  white-space: nowrap;
}

.bhost-body > .footer .footer-brand__rights,
.bhost-body > .footer .company-info p {
  margin: 0;
  color: #a8a8b8;
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.5;
}

.bhost-body > .footer .section-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 18px;
  color: #f0f0f5;
  line-height: 1.35;
}

.bhost-body > .footer .footer-links {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.bhost-body > .footer .footer-links a,
.bhost-body > .footer .footer-links button {
  color: #a8a8b8;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: normal;
  transition: color 0.3s;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.bhost-body > .footer .footer-links a:hover,
.bhost-body > .footer .footer-links button:hover {
  color: #6c63ff;
}

.bhost-body > .footer .brand-logo {
  width: auto;
  height: 56px;
  max-width: 64px;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}

@media (max-width: 1024px) {
  .bhost-body > .footer .footer-grid {
    gap: 28px 32px;
  }

  .bhost-body > .footer .footer-brand {
    flex: 1 1 100%;
    max-width: none;
  }
}

@media (max-width: 768px) {
  .bhost-body > .footer {
    padding: 32px 0 28px;
  }

  .bhost-body > .footer .footer-grid {
    justify-content: flex-start;
    gap: 28px 24px;
  }

  .bhost-body > .footer .footer-brand {
    flex: 1 1 100%;
  }

  .bhost-body > .footer .footer-section {
    flex: 1 1 calc(50% - 12px);
    min-width: 140px;
  }
}

@media (max-width: 480px) {
  .bhost-body > .footer .container {
    padding-left: var(--bhost-layout-gutter, var(--bhost-site-gutter, 16px));
    padding-right: var(--bhost-layout-gutter, var(--bhost-site-gutter, 16px));
  }

  .bhost-body > .footer .footer-brand a,
  .bhost-body > .footer .footer-brand-static,
  .bhost-body > .footer .footer-brand__name {
    font-size: 1.5rem;
  }

  .bhost-body > .footer .footer-brand__rights,
  .bhost-body > .footer .company-info p {
    font-size: 1.0625rem;
  }

  .bhost-body > .footer .brand-logo {
    height: 48px;
    max-width: 56px;
  }

  .bhost-body > .footer .footer-section {
    flex: 1 1 100%;
  }
}

/* Services catalog tabs — unified on landing and /my/buy */
.services-section .services-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-bottom: 32px;
}

.services-section .services-controls-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.services-section .service-tabs,
.services-section .location-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 6px;
  min-height: 54px;
  box-sizing: border-box;
}

.services-section .service-tab,
.services-section .location-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 18px;
  margin: 0;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: #a0a0b0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.25;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
  box-sizing: border-box;
}

.services-section .service-tab.active,
.services-section .location-tab.active {
  background: rgba(108, 99, 255, 0.2);
  color: #fff;
  border: 1px solid rgba(108, 99, 255, 0.35);
}

.services-section .service-tab .tab-icon {
  font-size: 1rem;
  line-height: 1;
}

.services-section .country-flag {
  width: 24px;
  height: 18px;
  border-radius: 3px;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}

.services-section .currency-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  min-height: 54px;
  box-sizing: border-box;
}

.services-section .currency-toggle__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #6b6b7a;
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.services-section .currency-toggle__btn[aria-pressed='true'] {
  background: rgba(108, 99, 255, 0.2);
  color: #fff;
}

@media (max-width: 480px) {
  .services-section .service-tab,
  .services-section .location-tab {
    min-height: 38px;
    padding: 8px 12px;
    font-size: 13px;
  }

  .services-section .service-tabs,
  .services-section .location-tabs,
  .services-section .currency-toggle {
    min-height: 50px;
  }

  .services-section .currency-toggle__btn {
    width: 38px;
    height: 38px;
    font-size: 16px;
  }
}

/* Custom consent checkbox — loaded after Tailwind on panel pages */
.bhost-panel-main .bhost-custom-checkbox__input,
.bhost-auth-wrap .bhost-custom-checkbox__input {
  appearance: none !important;
  -webkit-appearance: none !important;
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
}

.bhost-panel-main .bhost-custom-checkbox__box,
.bhost-auth-wrap .bhost-custom-checkbox__box {
  display: block;
  flex-shrink: 0;
  background: transparent !important;
  background-image: none !important;
}

/* Chrome Android: avoid GPU layer bugs (blur, overlays, transforms, gradients) */
@media (max-width: 768px), (hover: none) and (pointer: coarse) {
  .bhost-body > .header,
  .bhost-body--panel > .header,
  .bhost-body--public > .header,
  .bhost-body--auth > .header {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transform: none !important;
    -webkit-transform: none !important;
    backface-visibility: visible !important;
    -webkit-backface-visibility: visible !important;
    background: #1e2136 !important;
    background-image: none !important;
  }

  .tariff-card::before,
  .bhost-services-page .tariff-card.bhost-server-card::before {
    display: none !important;
    content: none !important;
  }

  .bhost-buy-page .tariff-card,
  .services-section .tariff-card,
  .bhost-services-page .tariff-card.bhost-server-card,
  .tariffs-grid .tariff-card {
    overflow: visible !important;
    box-shadow: none !important;
    background: #1e2136 !important;
    background-image: none !important;
    transform: none !important;
    -webkit-transform: none !important;
    transition: border-color 0.2s ease, background-color 0.2s ease !important;
    contain: layout style paint;
    border-top: 3px solid rgba(108, 99, 255, 0.22);
  }

  .bhost-buy-page .tariff-card:hover,
  .services-section .tariff-card:hover,
  .bhost-services-page .tariff-card.bhost-server-card:hover,
  .tariffs-grid .tariff-card:hover {
    transform: none !important;
    box-shadow: none !important;
  }

  .tariff-card--selected {
    border-color: rgba(108, 99, 255, 0.75) !important;
    box-shadow: none !important;
  }

  .tariff-card__check {
    display: none !important;
  }

  .services-section .tariff-features,
  .bhost-services-page .tariff-features {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }

  .services-section .tariff-features .feature,
  .bhost-services-page .tariff-features .feature {
    background: #171a30 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
  }

  .services-section .feature-icon,
  .bhost-services-page .feature-icon {
    width: 15px !important;
    height: 15px !important;
    min-width: 15px !important;
    min-height: 15px !important;
    max-width: 15px !important;
    max-height: 15px !important;
    flex: 0 0 15px !important;
    overflow: hidden !important;
    shape-rendering: geometricPrecision;
  }

  .bhost-welcome-banner,
  .bhost-empty-plaque,
  .bhost-empty-card {
    background: #1e2136 !important;
    background-image: none !important;
    overflow: visible !important;
  }

  .tariffs-grid,
  .bhost-services-page .bhost-server-grid--services {
    gap: 20px;
    isolation: isolate;
  }

  .bhost-inline-checkout {
    display: none !important;
  }

  .pace .pace-activity {
    display: none !important;
  }
}
