/* ==========================================================================
   ChatScan - Navbar & Footer Stylesheet (Prysel Design System)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Header & Navbar
   -------------------------------------------------------------------------- */
.ps-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  background-color: #ffffff;
  border-bottom: 1px solid #e5e5e5;
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.ps-header-main {
  height: 56px;
  display: flex;
  align-items: center;
  width: 100%;
}

.ps-header-container {
  max-width: 1200px;
  width: 100%;
  margin-right: auto;
  margin-left: auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.ps-nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.ps-nav-brand:hover {
  opacity: 0.85;
}

.ps-nav-logo-img {
  height: 24px;
  width: auto;
  display: block;
}

.ps-nav-badge {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 2px 6px;
  border-radius: 4px;
  background-color: #000;
  color: #fff;
  line-height: 1.2;
  text-transform: uppercase;
}

.ps-nav-search-form {
  position: relative;
  margin-left: 8px;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 270px;
}

.ps-nav-search-icon {
  position: absolute;
  left: 10px;
  pointer-events: none;
  color: #8c8c8c;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ps-nav-search-input {
  height: 32px;
  width: 100%;
  border-radius: 6px;
  border: 1px solid #e1e4e8;
  background-color: #fff;
  padding: 4px 48px 4px 32px;
  font-size: 13px;
  color: #171717;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
}

.ps-nav-search-input:focus {
  border-color: #000;
  box-shadow: 0 0 0 1px #000;
}

.ps-nav-search-input::placeholder {
  color: #8c8c8c;
}

.ps-nav-kbd {
  position: absolute;
  right: 6px;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 2px;
  border-radius: 4px;
  border: 1px solid #e1e4e8;
  background-color: #f6f8fa;
  padding: 1.5px 5px;
  font-family: 'SFMono-Regular', ui-monospace, Menlo, monospace;
  font-size: 10px;
  font-weight: 600;
  color: #586069;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.ps-kbd-meta {
  font-size: 10px;
}

.ps-nav-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.ps-nav-link {
  font-size: 13.5px;
  font-weight: 500;
  color: #525252;
  text-decoration: none;
  transition: color 0.15s ease;
  padding: 4px 0;
}

.ps-nav-link:hover {
  color: #000;
}

.ps-nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
}

.ps-network-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  box-sizing: border-box;
  border-radius: 6px;
  background-color: #f6f8fa;
  border: 1px solid #e1e4e8;
  font-size: 11.5px;
  font-weight: 600;
  color: #24292e;
  white-space: nowrap;
}

.ps-network-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
  animation: ps-pulse 2s infinite ease-in-out;
  flex-shrink: 0;
}

@keyframes ps-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.ps-network-name {
  font-family: inherit;
}

.ps-network-height {
  color: #8c8c8c;
  font-family: 'SFMono-Regular', ui-monospace, Menlo, monospace;
  font-size: 10.5px;
}

.ps-nav-btn-gh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  box-sizing: border-box;
  border-radius: 6px;
  border: 1px solid #e1e4e8;
  background-color: #fff;
  color: #24292e;
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.15s, border-color 0.15s;
}

.ps-nav-btn-gh:hover {
  background-color: #f6f8fa;
  border-color: #d1d5db;
  color: #000;
}

.ps-nav-gh-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
}

.ps-nav-gh-icon svg {
  width: 15px;
  height: 15px;
}

.ps-mobile-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  box-sizing: border-box;
  border-radius: 6px;
  border: 1px solid #e1e4e8;
  background-color: #fff;
  color: #24292e;
  cursor: pointer;
  padding: 0;
  transition: background-color 0.15s, border-color 0.15s;
}

.ps-mobile-toggle:hover {
  background-color: #f6f8fa;
  border-color: #d1d5db;
}

.ps-icon-menu {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ps-icon-close {
  display: none;
  align-items: center;
  justify-content: center;
}

.ps-header.is-mobile-open .ps-icon-menu {
  display: none;
}

.ps-header.is-mobile-open .ps-icon-close {
  display: flex;
}

.ps-header.is-mobile-open .ps-mobile-drawer {
  display: block;
}

/* Secondary Subnav */
.ps-header-subnav {
  border-top: 1px solid #f0f0f0;
  background-color: #ffffff;
}

.ps-subnav-container {
  max-width: 1200px;
  width: 100%;
  margin-right: auto;
  margin-left: auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 40px;
}

.ps-subnav-tabs {
  display: flex;
  align-items: center;
  gap: 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  min-width: 0;
}

.ps-subnav-tabs::-webkit-scrollbar {
  display: none;
}

.ps-subnav-tab {
  font-size: 12.5px;
  font-weight: 500;
  color: #6b7280;
  text-decoration: none;
  white-space: nowrap;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.ps-subnav-tab:hover {
  color: #000;
}

.ps-subnav-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 6px;
  border: 1px solid #e1e4e8;
  background-color: #fff;
  font-size: 11.5px;
  font-weight: 500;
  color: #24292e;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: 16px;
  transition: background-color 0.15s;
}

.ps-subnav-action:hover {
  background-color: #f6f8fa;
  color: #000;
}

.ps-subnav-action-icon {
  display: flex;
  align-items: center;
}

/* Mobile Drawer */
.ps-mobile-drawer {
  display: none;
  border-top: 1px solid #e5e5e5;
  background-color: #fff;
  padding: 16px 20px 24px;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.08);
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

@keyframes ps-drawer-enter {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ps-header.is-mobile-open .ps-mobile-drawer {
  display: block;
  animation: ps-drawer-enter 0.18s ease-out;
}

.ps-mobile-search-form {
  position: relative;
  margin-bottom: 16px;
}

.ps-mobile-search-input {
  width: 100%;
  height: 38px;
  border-radius: 8px;
  border: 1px solid #e1e4e8;
  background-color: #f9fafb;
  padding: 6px 12px 6px 36px;
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
  font-family: inherit;
  transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
}

.ps-mobile-search-input:focus {
  background-color: #fff;
  border-color: #000;
  box-shadow: 0 0 0 1px #000;
}

.ps-mobile-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ps-mobile-link {
  font-size: 15px;
  font-weight: 600;
  color: #171717;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background-color 0.15s, color 0.15s;
}

.ps-mobile-link:hover,
.ps-mobile-link:active {
  background-color: #f3f4f6;
  color: #000;
}

.ps-mobile-divider {
  height: 1px;
  background-color: #f0f0f0;
  margin: 8px 0;
}

.ps-mobile-sublink {
  font-size: 13.5px;
  font-weight: 500;
  color: #4b5563;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background-color 0.15s, color 0.15s;
}

.ps-mobile-sublink:hover,
.ps-mobile-sublink:active {
  background-color: #f3f4f6;
  color: #000;
}

.ps-mobile-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid #e1e4e8;
  background-color: #f9fafb;
  font-size: 13px;
  font-weight: 500;
  color: #24292e;
  text-decoration: none;
  width: fit-content;
  margin-top: 4px;
  transition: background-color 0.15s;
}

.ps-mobile-action:hover {
  background-color: #f3f4f6;
  color: #000;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.ps-footer {
  position: relative;
  width: 100%;
  border-top: 1px solid #e5e5e5;
  background-color: #fafafa;
  color: #171717;
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  overflow: hidden;
}

.ps-footer-container {
  max-width: 1200px;
  margin-right: auto;
  margin-left: auto;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  position: relative;
  z-index: 10;
}

/* Left Column */
.ps-footer-left {
  grid-column: span 4;
  border-right: 1px solid #e5e5e5;
  padding: 48px 40px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 540px;
  background-color: #fafafa;
}

.ps-footer-plus-tr {
  position: absolute;
  top: -9px;
  right: -5px;
  color: #a3a3a3;
  font-size: 18px;
  font-weight: 300;
  line-height: 1;
  user-select: none;
  pointer-events: none;
}

.ps-footer-plus-br {
  position: absolute;
  bottom: -9px;
  right: -5px;
  color: #a3a3a3;
  font-size: 18px;
  font-weight: 300;
  line-height: 1;
  user-select: none;
  pointer-events: none;
}

.ps-footer-brand-wrap {
  margin-bottom: 24px;
}

.ps-footer-brand {
  display: inline-block;
  transition: opacity 0.2s;
}

.ps-footer-brand:hover {
  opacity: 0.8;
}

.ps-footer-heading {
  font-size: 42px;
  font-weight: 900;
  letter-spacing: -0.05em;
  margin-top: 0;
  margin-bottom: 16px;
  line-height: 1.05;
  color: #000;
}

.ps-footer-desc {
  color: #525252;
  font-size: 13.5px;
  line-height: 1.6;
  margin-bottom: 32px;
  max-width: 300px;
  font-weight: 400;
}

.ps-newsletter-form {
  position: relative;
  max-width: 320px;
  margin-bottom: 32px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  border-radius: 9999px;
  background: #fff;
  border: 1px solid #d4d4d4;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ps-newsletter-form:focus-within {
  border-color: #737373;
  box-shadow: 0 0 0 1px #737373;
}

.ps-newsletter-input {
  width: 100%;
  padding: 13px 52px 13px 20px;
  border: 0;
  border-radius: 9999px;
  outline: none;
  background: transparent;
  font-size: 13.5px;
  color: #171717;
  font-family: inherit;
}

.ps-newsletter-input::placeholder {
  color: #a3a3a3;
}

.ps-newsletter-btn {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 36px;
  height: 36px;
  background: #000;
  color: #fff;
  border-radius: 9999px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
}

.ps-newsletter-btn:hover {
  opacity: 0.85;
}

.ps-newsletter-btn:active {
  transform: scale(0.95);
}

.ps-newsletter-icon-default {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ps-newsletter-icon-success {
  display: none;
  align-items: center;
  justify-content: center;
}

.ps-newsletter-form.is-submitted .ps-newsletter-icon-default {
  display: none;
}

.ps-newsletter-form.is-submitted .ps-newsletter-icon-success {
  display: flex;
}

.ps-newsletter-feedback {
  font-size: 12px;
  color: #059669;
  font-weight: 500;
  margin-top: -20px;
  margin-bottom: 24px;
  display: none;
}

/* Right Grid */
.ps-footer-right {
  grid-column: span 8;
  position: relative;
  display: flex;
  flex-direction: column;
  background-color: #fafafa;
}

.ps-footer-nav-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid #e5e5e5;
  position: relative;
  z-index: 10;
}

.ps-footer-col {
  position: relative;
  padding: 36px 28px;
  border-right: 1px solid #e5e5e5;
  display: flex;
  flex-direction: column;
}

.ps-footer-col:last-child {
  border-right: none;
}

.ps-col-plus-tr {
  position: absolute;
  top: -11px;
  right: -5px;
  color: #a3a3a3;
  font-size: 20px;
  font-weight: 300;
  line-height: 1;
  user-select: none;
  pointer-events: none;
}

.ps-col-plus-br {
  position: absolute;
  bottom: -11px;
  right: -5px;
  color: #a3a3a3;
  font-size: 20px;
  font-weight: 300;
  line-height: 1;
  user-select: none;
  pointer-events: none;
}

.ps-footer-col-title {
  font-size: 11px;
  color: #737373;
  margin-top: 0;
  margin-bottom: 24px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.ps-footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.ps-footer-link {
  font-size: 13px;
  font-weight: 500;
  color: #525252;
  text-decoration: none;
  transition: color 0.15s ease;
  line-height: 1.4;
}

.ps-footer-link:hover {
  color: #000;
}

/* Watermark Zone */
.ps-footer-watermark {
  position: relative;
  flex-grow: 1;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  user-select: none;
  pointer-events: none;
}

.ps-watermark-text {
  font-size: clamp(52px, 9.5vw, 120px);
  font-weight: 900;
  color: rgba(0, 0, 0, 0.06);
  letter-spacing: -0.05em;
  white-space: nowrap;
  transform: translateY(8px);
}

/* Bottom Bar */
.ps-footer-bottom {
  max-width: 1200px;
  margin-right: auto;
  margin-left: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 20px;
  font-size: 11px;
  font-weight: 600;
  color: #737373;
  border-top: 1px solid #e5e5e5;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  position: relative;
  z-index: 20;
}

.ps-footer-copy {
  margin: 0;
}

.ps-footer-bottom-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
}

.ps-footer-bottom-link {
  color: #737373;
  text-decoration: none;
  transition: color 0.15s;
}

.ps-footer-bottom-link:hover {
  color: #000;
}

.ps-footer-top-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  border-left: 1px solid #e5e5e5;
  padding: 0 0 0 20px;
  margin-left: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #737373;
  cursor: pointer;
  transition: color 0.15s;
  font-family: inherit;
}

.ps-footer-top-btn:hover {
  color: #000;
}

.ps-top-icon {
  display: inline-flex;
  align-items: center;
}

/* --------------------------------------------------------------------------
   Responsive Breakpoints
   -------------------------------------------------------------------------- */
@media screen and (max-width: 991px) {
  /* Footer tablet */
  .ps-footer-container {
    grid-template-columns: 1fr;
  }

  .ps-footer-left {
    grid-column: span 1;
    border-right: none;
    border-bottom: 1px solid #e5e5e5;
    min-height: auto;
    padding: 40px 24px;
  }

  .ps-footer-plus-tr,
  .ps-footer-plus-br {
    display: none;
  }

  .ps-footer-right {
    grid-column: span 1;
  }

  .ps-footer-nav-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ps-footer-col {
    padding: 28px 24px;
  }

  .ps-footer-col:nth-child(2) {
    border-right: none;
  }

  .ps-footer-col:nth-child(1),
  .ps-footer-col:nth-child(2) {
    border-bottom: 1px solid #e5e5e5;
  }

  .ps-footer-watermark {
    min-height: 180px;
  }

  .ps-footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }

  .ps-footer-bottom-links {
    justify-content: center;
  }

  .ps-footer-top-btn {
    border-left: none;
    padding-left: 0;
    margin-left: 0;
  }
}

@media screen and (max-width: 860px) {
  /* Navbar tablet / mobile */
  .ps-header-main {
    height: 52px;
  }

  .ps-header-container {
    padding: 0 16px;
    gap: 12px;
  }

  .ps-nav-search-form {
    display: none;
  }

  .ps-nav-links {
    display: none;
  }

  .ps-mobile-toggle {
    display: flex;
  }

  .ps-header-subnav {
    display: none;
  }

  .ps-nav-btn-gh .ps-nav-gh-text {
    display: none;
  }

  .ps-nav-btn-gh {
    width: 32px;
    height: 32px;
    padding: 0;
    justify-content: center;
  }

  .ps-nav-actions {
    gap: 8px;
    margin-left: auto;
  }
}

@media screen and (max-width: 520px) {
  .ps-header-container {
    padding: 0 12px;
  }

  .ps-nav-actions {
    gap: 6px;
  }

  .ps-network-height {
    display: none;
  }

  .ps-network-indicator {
    padding: 0 8px;
    font-size: 11px;
    gap: 5px;
  }

  .ps-nav-logo-img {
    height: 22px;
  }
}

@media screen and (max-width: 380px) {
  .ps-header-container {
    padding: 0 10px;
    gap: 8px;
  }

  .ps-nav-actions {
    gap: 5px;
  }

  .ps-network-indicator {
    padding: 0 6px;
    font-size: 10px;
    gap: 4px;
  }

  .ps-nav-logo-img {
    height: 20px;
  }
}

@media screen and (max-width: 480px) {
  /* Footer mobile */
  .ps-footer-nav-grid {
    grid-template-columns: 1fr;
  }

  .ps-footer-col {
    border-right: none;
    border-bottom: 1px solid #e5e5e5;
  }

  .ps-footer-col:last-child {
    border-bottom: none;
  }

  .ps-footer-heading {
    font-size: 32px;
  }
}
