/* Sandboxed partner widget. This route is framed cross-origin by design. */
body.page-widget-embed {
  min-width: 0;
  margin: 0;
  padding: 8px;
  background: transparent;
  color: #172033;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.page-widget-embed .gm-card {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  padding: 18px;
  border: 1px solid #d9e2ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.08);
}

.page-widget-embed .gm-header {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 14px;
}

.page-widget-embed .gm-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  padding: 7px;
  border-radius: 8px;
  background: #164e9f;
  fill: #fff;
}

.page-widget-embed h1 {
  margin: 0 0 2px;
  color: #172033;
  font-size: 1.1rem;
  line-height: 1.3;
}

.page-widget-embed .gm-header p {
  margin: 0;
  color: #526078;
  font-size: var(--type-body);
  line-height: var(--leading-body);
}

.page-widget-embed label {
  display: block;
  margin-bottom: 5px;
  color: #2b374d;
  font-size: var(--type-ui);
  font-weight: 700;
}

.page-widget-embed .gm-control-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.page-widget-embed .tgm-city-select-picker {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
}

.page-widget-embed .tgm-city-select-input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid #aebbd0;
  border-radius: 7px;
  background: #fff;
  color: #172033;
  font: inherit;
}

.page-widget-embed .tgm-city-select-options {
  position: absolute;
  z-index: 4;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  max-height: 240px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid #aebbd0;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
  -webkit-overflow-scrolling: touch;
}

.page-widget-embed .tgm-city-select-options[hidden] { display: none; }
.page-widget-embed .tgm-city-select-option {
  min-height: 44px;
  padding: 10px;
  border-bottom: 1px solid #d9e2ef;
  color: #172033;
  cursor: pointer;
  font-size: var(--type-ui);
  text-align: left;
}
.page-widget-embed .tgm-city-select-option:last-child { border-bottom: 0; }
.page-widget-embed .tgm-city-select-option:hover,
.page-widget-embed .tgm-city-select-option[aria-selected="true"] {
  background: #edf4ff;
  color: #164e9f;
}
.page-widget-embed .tgm-city-select-status,
.page-widget-embed .tgm-city-select-noscript {
  margin: 5px 0 0;
  color: #526078;
  font-size: var(--type-ui);
  line-height: 1.4;
}

.page-widget-embed select,
.page-widget-embed button {
  min-height: 44px;
  border-radius: 7px;
  font: inherit;
}

.page-widget-embed select {
  min-width: 0;
  flex: 1;
  padding: 8px 10px;
  border: 1px solid #aebbd0;
  background: #fff;
  color: #172033;
}

.page-widget-embed button {
  flex: 0 0 auto;
  padding: 8px 14px;
  border: 1px solid #164e9f;
  background: #164e9f;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.page-widget-embed select:focus-visible,
.page-widget-embed .tgm-city-select-input:focus-visible,
.page-widget-embed button:focus-visible,
.page-widget-embed a:focus-visible {
  outline: 3px solid #f3a712;
  outline-offset: 2px;
}

.page-widget-embed button:disabled,
.page-widget-embed .tgm-city-select-input:disabled,
.page-widget-embed select:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.page-widget-embed .gm-error {
  margin: 8px 0 0;
  color: #a11212;
  font-size: var(--type-body);
  line-height: var(--leading-body);
}

.page-widget-embed .gm-footer {
  margin-top: 10px;
  text-align: right;
}

.page-widget-embed .gm-footer a {
  color: #465a78;
  font-size: var(--type-ui);
}

@media (max-width: 360px), (max-height: 300px) {
  .page-widget-embed .gm-header p,
  .page-widget-embed .tgm-city-select-status {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .page-widget-embed .tgm-city-select-status--visible {
    position: absolute;
    z-index: 5;
    top: calc(100% + 4px);
    right: 0;
    left: 0;
    width: auto;
    height: auto;
    margin: 0;
    padding: 8px 10px;
    overflow: visible;
    clip: auto;
    white-space: normal;
    border: 1px solid #aebbd0;
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14);
  }
}

@media (max-width: 360px) {
  .page-widget-embed .gm-card { padding: 14px; }
  .page-widget-embed .gm-header { margin-bottom: 8px; }
  .page-widget-embed .tgm-city-select-options { max-height: 160px; }
  .page-widget-embed .gm-control-row { flex-direction: column; }
  .page-widget-embed button { width: 100%; }
}

@media (max-height: 500px) {
  .page-widget-embed .tgm-city-select-options { max-height: 160px; }
}

/* Existing partners may still have the originally published 250px,
   scrolling-disabled iframe. Keep that contract usable while new embeds use
   the more generous height in widget.js and the copyable examples. */
@media (max-height: 300px) {
  body.page-widget-embed { padding: 4px; }
  .page-widget-embed .gm-card { padding: 8px; }
  .page-widget-embed .gm-header { margin-bottom: 6px; }
  .page-widget-embed .tgm-city-select-input { min-height: 44px; height: 44px; padding: 6px 8px; }
  .page-widget-embed .tgm-city-select-options { max-height: 88px; }
  .page-widget-embed .gm-footer { margin-top: 6px; }
}
