/*
 * Iseld v34.6
 * Stabilt varslingspanel på PC/mobil og temavelger kun i innloggede innstillinger.
 */

.iseld-notification-panel {
  z-index: 10080 !important;
}

.iseld-notification-panel header {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 76px;
}

.iseld-notification-panel > #iseldNotificationList {
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

@media (min-width: 769px) {
  .iseld-notification-center.inline .iseld-notification-panel {
    position: fixed !important;
    top: var(--iseld-notification-top, 112px) !important;
    right: var(--iseld-notification-right, 24px) !important;
    bottom: auto !important;
    left: auto !important;
    width: min(420px, calc(100vw - 32px)) !important;
    max-height: min(520px, calc(100dvh - var(--iseld-notification-top, 112px) - 18px)) !important;
    border-radius: 20px !important;
    box-shadow: 0 24px 64px rgba(15, 23, 42, .22) !important;
  }

  .iseld-notification-center.inline .iseld-notification-panel > #iseldNotificationList {
    max-height: calc(min(520px, calc(100dvh - var(--iseld-notification-top, 112px) - 18px)) - 76px) !important;
  }
}

@media (max-width: 768px) {
  .iseld-notification-center.inline .iseld-notification-panel {
    top: max(68px, calc(env(safe-area-inset-top) + 58px)) !important;
    right: 10px !important;
    bottom: auto !important;
    left: 10px !important;
    width: auto !important;
    max-height: calc(100dvh - max(86px, calc(env(safe-area-inset-top) + 76px))) !important;
  }

  .iseld-notification-center.inline .iseld-notification-panel > #iseldNotificationList {
    max-height: calc(100dvh - max(162px, calc(env(safe-area-inset-top) + 152px))) !important;
  }
}

#settingsModal .settings-theme-card {
  padding: 18px !important;
}

#settingsModal .settings-theme-switcher {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

#settingsModal .settings-theme-switcher .dashboard-theme-btn {
  display: grid;
  grid-template-columns: 34px 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-items: center;
  min-height: 76px;
  padding: 12px !important;
  border-radius: 16px;
  text-align: left;
}

#settingsModal .settings-theme-switcher .dashboard-theme-btn > span {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: #eef3ff;
  color: #315caa;
  font-size: 18px;
}

#settingsModal .settings-theme-switcher .dashboard-theme-btn strong,
#settingsModal .settings-theme-switcher .dashboard-theme-btn small {
  display: block;
}

#settingsModal .settings-theme-switcher .dashboard-theme-btn small {
  margin-top: 2px;
  color: #718096;
  font-size: 11px;
  font-weight: 700;
}

#settingsModal .settings-theme-switcher .dashboard-theme-btn.active small {
  color: rgba(255, 255, 255, .82);
}

#settingsModal .settings-theme-note {
  margin: 14px 2px 0;
  color: #64748b;
  font-size: 13px;
}

/* Sikkerhetsregel: kundens offentlige booking skal aldri vise en temavelger. */
#publicBookingView #bookingThemeSwitcher,
#publicBookingView .booking-theme-switcher,
#publicBookingView .booking-theme-title {
  display: none !important;
}

@media (max-width: 1100px) {
  #settingsModal .settings-theme-switcher {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  #settingsModal .settings-theme-card {
    padding: 12px !important;
  }

  #settingsModal .settings-theme-switcher {
    grid-template-columns: 1fr;
  }
}
