/* Unified ClearToBook Static Header CSS */
:root {
  --ctb-brand: #1665d8;
  --ctb-brand-hover: #1251b0;
  --ctb-brand-light: #eef5ff;
  --ctb-text-primary: #0f172a;
  --ctb-text-secondary: #475569;
  --ctb-text-muted: #94a3b8;
  --ctb-surface-border: #e2e8f0;
  --ctb-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --ctb-shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.ctb-site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--ctb-surface-border);
  box-shadow: var(--ctb-shadow-sm);
  width: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.app-shell,
.partner-shell,
.ctb-static-page,
body.has-unified-header {
  padding-top: 60px;
}

.ctb-header-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
  width: 100%;
}

.ctb-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  gap: 12px;
  box-sizing: border-box;
}

/* Brand Link */
.ctb-header-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--ctb-brand);
  flex-shrink: 0;
}

.ctb-header-logo-img {
  height: 32px;
  width: auto;
  object-fit: contain;
}

.ctb-header-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.ctb-header-brand-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--ctb-brand);
  letter-spacing: -0.02em;
}

.ctb-header-brand-badge {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--ctb-brand);
  text-transform: uppercase;
}

/* Navigation Links */
.ctb-header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.ctb-nav-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ctb-text-secondary);
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.ctb-nav-item:hover {
  color: var(--ctb-brand);
  background-color: var(--ctb-brand-light);
}

.ctb-nav-icon {
  font-size: 14px;
  line-height: 1;
}

/* Dropdowns */
.ctb-dropdown-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.ctb-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ctb-text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  font-family: inherit;
}

.ctb-dropdown-trigger:hover,
.ctb-dropdown-wrapper:hover .ctb-dropdown-trigger {
  color: var(--ctb-brand);
  background-color: var(--ctb-brand-light);
}

.ctb-chevron-icon {
  transition: transform 0.2s ease;
}

.ctb-dropdown-wrapper:hover .ctb-chevron-icon,
.ctb-dropdown-wrapper.open .ctb-chevron-icon {
  transform: rotate(180deg);
}

.ctb-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 300px;
  background: #ffffff;
  border: 1px solid var(--ctb-surface-border);
  border-radius: 12px;
  box-shadow: var(--ctb-shadow-lg);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px);
  transition: all 0.18s ease;
  z-index: 1050;
}

.ctb-dropdown-menu-explore {
  min-width: 560px;
  max-width: calc(100vw - 24px);
  padding: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.ctb-dropdown-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ctb-dropdown-col:first-child {
  padding-right: 8px;
  border-right: 1px solid var(--ctb-surface-border);
}

.ctb-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
  background: transparent;
}

.ctb-dropdown-wrapper:hover .ctb-dropdown-menu,
.ctb-dropdown-wrapper.open .ctb-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.ctb-dropdown-header {
  padding: 6px 10px 4px;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ctb-text-muted);
}

.ctb-dropdown-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ctb-text-primary);
  transition: background-color 0.15s ease;
}

.ctb-dropdown-link:hover {
  background-color: var(--ctb-brand-light);
  color: var(--ctb-brand);
}

.ctb-dropdown-link-icon {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}

.ctb-dropdown-link-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.ctb-dropdown-link-text strong {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}

.ctb-dropdown-link-text small {
  font-size: 11px;
  color: var(--ctb-text-secondary);
  line-height: 1.2;
}

.ctb-dropdown-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  background-color: var(--ctb-brand-light);
  color: var(--ctb-brand);
  border: 1px solid #bfdbfe;
  flex-shrink: 0;
}

.ctb-dropdown-link-wa {
  background-color: #ecfdf5;
  color: #065f46;
}

.ctb-dropdown-link-wa:hover {
  background-color: #d1fae5;
  color: #047857;
}

.ctb-dropdown-divider {
  height: 1px;
  background-color: var(--ctb-surface-border);
  margin: 4px 0;
}

/* Badges */
.ctb-badge-desk,
.ctb-badge-hub {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  line-height: 1;
}

.ctb-badge-desk {
  background-color: var(--ctb-brand-light);
  color: var(--ctb-brand);
  border: 1px solid #bfdbfe;
}

.ctb-badge-hub {
  background-color: #f0f9ff;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.ctb-badge-chat {
  background-color: #059669;
  color: #ffffff;
  border: none;
}

.ctb-badge-hot {
  background-color: #ea580c;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
}

.ctb-badge-live {
  background-color: #dbeafe;
  color: #1d4ed8;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
}

.ctb-badge-cashback {
  background-color: #059669;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
}

.ctb-badge-explore {
  background-color: #e0f2fe;
  color: #0369a1;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
}

.ctb-badge-wa {
  background-color: var(--ctb-brand-light);
  color: var(--ctb-brand);
  border: 1px solid #bfdbfe;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
}

/* Header Actions */
.ctb-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.ctb-btn-signin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ctb-text-secondary);
  text-decoration: none;
  border-radius: 999px;
  transition: all 0.15s ease;
}

.ctb-btn-signin:hover {
  color: var(--ctb-brand);
  background-color: var(--ctb-brand-light);
}

.ctb-btn-signup {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 16px;
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  background-color: var(--ctb-brand);
  text-decoration: none;
  border-radius: 999px;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(22, 101, 216, 0.2);
}

.ctb-btn-signup:hover {
  background-color: var(--ctb-brand-hover);
}

/* User Session Avatar Badge */
.ctb-user-session-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  background: #ffffff;
  border: 1px solid var(--ctb-surface-border);
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
}

.ctb-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ctb-brand), var(--ctb-brand-hover));
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ctb-user-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--ctb-text-primary);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Mobile Hamburger Button */
.ctb-hamburger-btn {
  display: none;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--ctb-text-primary);
  cursor: pointer;
  border-radius: 8px;
  padding: 0;
  margin-left: auto;
}

.ctb-hamburger-btn:hover {
  background-color: var(--ctb-brand-light);
  color: var(--ctb-brand);
}

/* Mobile Drawer */
.ctb-mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.ctb-mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 290px;
  max-width: 85vw;
  height: 100vh;
  background: #ffffff;
  z-index: 1101;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
  transform: translateX(-100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

body.ctb-drawer-open {
  overflow: hidden;
}

body.ctb-drawer-open .ctb-mobile-drawer-overlay {
  opacity: 1;
  visibility: visible;
}

body.ctb-drawer-open .ctb-mobile-drawer {
  transform: translateX(0);
}

.ctb-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--ctb-surface-border);
}

.ctb-drawer-close-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  font-size: 20px;
  color: var(--ctb-text-secondary);
  cursor: pointer;
  border-radius: 6px;
}

.ctb-drawer-close-btn:hover {
  background-color: var(--ctb-brand-light);
  color: var(--ctb-brand);
}

.ctb-drawer-auth-box {
  padding: 12px 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  border-bottom: 1px solid var(--ctb-surface-border);
  background-color: #f8fafc;
}

.ctb-drawer-btn-signin {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ctb-text-primary);
  background: #ffffff;
  border: 1px solid var(--ctb-surface-border);
  border-radius: 8px;
  text-decoration: none;
}

.ctb-drawer-btn-signup {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  background-color: var(--ctb-brand);
  border-radius: 8px;
  text-decoration: none;
}

.ctb-drawer-nav {
  display: flex;
  flex-direction: column;
  padding: 10px 0 24px;
}

.ctb-drawer-section-title {
  padding: 10px 16px 4px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ctb-brand);
}

.ctb-drawer-link {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ctb-text-primary);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all 0.15s ease;
}

.ctb-drawer-link:hover {
  background-color: var(--ctb-brand-light);
  color: var(--ctb-brand);
  border-left-color: var(--ctb-brand);
}

.ctb-drawer-link-badge {
  justify-content: space-between;
}

.ctb-drawer-link-wa {
  background-color: #ecfdf5;
  color: #065f46;
  font-weight: 700;
  justify-content: space-between;
}

.ctb-drawer-link-wa:hover {
  background-color: #d1fae5;
  color: #047857;
}

.ctb-drawer-divider {
  height: 1px;
  background-color: var(--ctb-surface-border);
  margin: 8px 0;
}

/* Responsive Breakpoints */
@media (max-width: 1080px) {
  .ctb-header-nav {
    display: none;
  }
  .ctb-header-actions {
    display: none;
  }
  .ctb-hamburger-btn {
    display: flex;
  }
}
