/* PSWM: Sticky search banner with full-width mega menu */

body.pswm-lock {
  overflow: hidden;
}

.pswm-banner {
  width: 100%;
  background: var(--pswm-bg, #1B2D70);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  position: relative;
}

.pswm-banner--auto {
  position: sticky;
  top: var(--pswm-sticky-top, 0);
  z-index: 9998;
}

.pswm-search {
  width: 100%;
  margin: 0;
  display: grid;
  grid-template-columns: minmax(200px, 280px) 1fr 68px;
  align-items: stretch;
  background: var(--pswm-bg, #1B2D70);
  color: var(--pswm-text, #FFFFFF);
  border: solid var(--pswm-border-color, transparent);
  border-width: var(--pswm-border-width, 0);
  box-sizing: border-box;
  position: relative;
}

.pswm-cat {
  position: static;
  border-right: 1px solid rgba(255, 255, 255, 0.25);
}

.pswm-toggle {
  width: 100%;
  height: 100%;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: inherit;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
}

.pswm-toggle-icon {
  font-size: 20px;
  line-height: 1;
  color: var(--pswm-accent, #00A7DD);
}

.pswm-current {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pswm-caret {
  font-size: 16px;
  color: inherit;
}

.pswm-panel[hidden] {
  display: none !important;
}

.pswm-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--pswm-bg, #1B2D70);
  border: 2px solid var(--pswm-accent, #00A7DD);
  border-top: none;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.3);
  z-index: 9000;
}

.pswm-panel-inner {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 320px;
}

.pswm-panel-header {
  display: none;
}

.pswm-panel-body {
  display: grid;
  grid-template-columns: 260px 1fr;
}

.pswm-left {
  border-right: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.08);
}

.pswm-root {
  list-style: none;
  margin: 0;
  padding: 12px 0;
}

.pswm-root li {
  margin: 0;
}

.pswm-root-item {
  width: 100%;
  background: transparent;
  border: 0;
  padding: 14px 20px;
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  text-align: left;
  border-left: 4px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.pswm-root-item.is-active {
  border-left-color: var(--pswm-accent, #00A7DD);
  background: rgba(0, 167, 221, 0.16);
}

.pswm-root-item:hover,
.pswm-root-item:focus-visible {
  background: rgba(0, 167, 221, 0.24);
  outline: none;
}

.pswm-right {
  padding: 22px 28px;
  background: rgba(0, 0, 0, 0.05);
}

.pswm-subpanel {
  display: none;
}

.pswm-subpanel.is-active {
  display: block;
}

.pswm-hint {
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

.pswm-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 22px;
}

.pswm-col {
  min-width: 0;
}

.pswm-col-title {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--pswm-text, #FFFFFF);
  font-weight: 600;
  font-size: 15px;
  padding: 0 0 10px;
  text-align: left;
  cursor: pointer;
}

.pswm-col-title:hover,
.pswm-col-title:focus-visible {
  color: var(--pswm-accent, #00A7DD);
  outline: none;
}

.pswm-links {
  list-style: none;
  margin: 12px 0 0 0;
  padding: 0;
}

.pswm-links li {
  margin: 0;
}

.pswm-link {
  width: 100%;
  background: transparent;
  border: 0;
  padding: 8px 0;
  text-align: left;
  color: var(--pswm-text, #FFFFFF);
  cursor: pointer;
}

.pswm-link:hover,
.pswm-link:focus-visible {
  color: var(--pswm-accent, #00A7DD);
  outline: none;
}

.pswm-field {
  background: rgba(255, 255, 255, 0.08);
  border: 0;
  color: inherit;
  font-size: 16px;
  padding: 0 22px;
  min-width: 160px;
  width: 100%;
}

.pswm-field:focus-visible {
  outline: 2px solid var(--pswm-accent, #00A7DD);
  outline-offset: 2px;
}

.pswm-btn {
  background: var(--pswm-accent, #00A7DD);
  border: 0;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
  box-sizing: border-box;
  padding: 0 18px;
  min-width: 64px;
}

.pswm-btn:hover,
.pswm-btn:focus-visible {
  background: #0091c2;
  outline: none;
}

.pswm-btn-icon {
  width: 20px;
  height: 20px;
  background-repeat: no-repeat;
  background-size: 20px 20px;
  background-position: center;
  display: inline-block;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='26' height='26' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>");
}

.pswm-error {
  margin-left: 16px;
  color: #ffb3b3;
  font-size: 14px;
  align-self: center;
}

.pswm-input-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
}

.pswm-suggestions[hidden] {
  display: none !important;
}

.pswm-suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--pswm-bg, #1B2D70);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
  max-height: 320px;
  overflow-y: auto;
  z-index: 9050;
  padding: 6px 0;
}

.pswm-suggestion-item {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--pswm-text, #FFFFFF);
  text-align: left;
  padding: 10px 18px;
  cursor: pointer;
  font-size: 15px;
  display: block;
}

.pswm-suggestion-item:hover,
.pswm-suggestion-item:focus-visible {
  background: rgba(0, 167, 221, 0.25);
  outline: none;
}

.pswm-suggestion-item--primary {
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  margin-bottom: 4px;
}

.pswm-suggestion-empty {
  padding: 12px 18px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 14px;
}

@media (max-width: 1200px) {
  .pswm-grid {
    grid-template-columns: repeat(3, minmax(170px, 1fr));
  }
}

@media (max-width: 980px) {
  .pswm-grid {
    grid-template-columns: repeat(2, minmax(170px, 1fr));
  }
}

@media (max-width: 820px) {
  .pswm-search {
    grid-template-columns: 1fr 56px;
    min-height: 56px;
  }

  .pswm-cat {
    display: none;
  }

  .pswm-toggle {
    padding: 0;
    justify-content: center;
    font-size: 0;
  }

  .pswm-toggle-icon {
    font-size: 22px;
  }

  .pswm-current,
  .pswm-caret {
    display: none;
  }

  .pswm-field {
    padding: 0 16px;
    font-size: 15px;
    min-height: 56px;
  }

  .pswm-btn {
    width: 56px;
    padding: 0 12px;
  }

  .pswm-btn-icon {
    width: 18px;
    height: 18px;
    background-size: 18px 18px;
  }

  .pswm-panel {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    border: 0;
    display: flex;
    justify-content: center;
    align-items: stretch;
    padding: 0;
  }

  .pswm-panel-inner {
    display: flex;
    flex-direction: column;
    background: var(--pswm-bg, #1B2D70);
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
  }

  .pswm-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  }

  .pswm-panel-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
  }

  .pswm-close {
    background: transparent;
    border: 0;
    color: var(--pswm-text, #FFFFFF);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
  }

  .pswm-panel-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .pswm-left,
  .pswm-right {
    border: 0;
    padding: 18px 22px;
    overflow-y: auto;
  }

  .pswm-left {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .pswm-root {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    padding: 0;
  }

  .pswm-root-item {
    border-left: 0;
    border-radius: 6px;
    justify-content: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.08);
  }

  .pswm-root-item.is-active {
    background: var(--pswm-accent, #00A7DD);
  }

  .pswm-right {
    padding-top: 18px;
  }

  .pswm-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .pswm-col {
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .pswm-col:last-child {
    border-bottom: 0;
  }

  .pswm-links {
    margin-top: 10px;
  }

  .pswm-error {
    margin-left: 0;
    margin-top: 12px;
  }

  .pswm-suggestions {
    top: calc(100% + 4px);
    max-height: 260px;
  }
}
