/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * General
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

/* On desktop remove the phantom black bar on the bottom of the screen caused by inset. */
.layout>div[data-layoutid="layout_1"]>div:last-child {
  inset: 60px 0 0 0 !important;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * Info panel
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

/* Location heading: tablet */
[data-widgetid="widget_169"] p strong {
  font-weight: 800;
}

/* Location heading: mobile */
[data-widgetid="widget_173"] p strong {
  font-weight: 800;
}

/* Restore time heading: desktop */
[data-widgetid="widget_167"] p strong {
  font-weight: 800;
}

/* Restore time heading: tablet */
[data-widgetid="widget_170"] p strong {
  font-weight: 800;
}

/* Restore time heading: mobile */
[data-widgetid="widget_174"] p strong {
  font-weight: 800;
}

/* Total outages label: desktop */
[data-widgetid="widget_34"] p strong {
  font-weight: 800;
}

/* Total outages label: tablet */
[data-widgetid="widget_142"] p strong {
  font-weight: 800;
}

/* Total outages label: mobile */
[data-widgetid="widget_144"] p strong {
  font-weight: 800;
}

/* Total affected customers label: desktop */
[data-widgetid="widget_32"] p strong {
  font-weight: 800;
}

/* Total affected customers label: tablet */
[data-widgetid="widget_143"] p strong {
  font-weight: 800;
}

/* Total affected customers label: mobile */
[data-widgetid="widget_145"] p strong {
  font-weight: 800;
}

/* Left justify the no outages message. */
[data-widgetid="widget_148"] .empty-con {
  display: flex;
  flex-direction: row;
  text-align: left !important;
  padding: 18px;
}

/* Align the warning icon in the no outages message. */
[data-widgetid="widget_148"] .empty-con svg {
  flex-shrink: 0;
  margin: 13px 10px 0 0;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * Info panel - mobile and tablet
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

/* Get rid of phantom black bar caused by inset of bottom panel by making background of parent white. */
.size-mode-SMALL .layout>div[data-layoutid="layout_55"],
.size-mode-MEDIUM .layout>div[data-layoutid="layout_45"] {
  background: white !important;
}

/* Button font size larger on tablet */
[data-widgetid="widget_139"] a span,
[data-widgetid="widget_147"] a span {
  font-size: 2.329vw !important;
}

/* Left justify the no outages message. */
/* mobile */
[data-widgetid="widget_94"] .empty-con {
  display: flex;
  flex-direction: row;
  text-align: left !important;
  padding: 0 10px 0 15px;
}

[data-widgetid="widget_94"] .empty-con .discribtion {
  font-size: 2.8vw !important;
}

[data-widgetid="widget_94"] .empty-con svg {
  flex-shrink: 0;
  margin: 11px 10px 0 0;
}

/* tablet */
[data-widgetid="widget_77"] .empty-con {
  display: flex;
  flex-direction: row;
  text-align: left !important;
  padding: 0 0 0 18px;
}

[data-widgetid="widget_77"] .empty-con .discribtion {
  font-size: 2.1vw !important;
}

[data-widgetid="widget_77"] .empty-con svg {
  flex-shrink: 0;
  margin: 13px 10px 0 0;
}


/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * Map controls: general
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

/* Hide attribution line. */
.scale-attribution-xy-group {
  display: none !important;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * Map controls: mobile
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

/* Shift the map icons back up away from bottom panel. */
#widget_11:last-child {
  margin-bottom: 30px;
}

/*
  Consolidate map control icons in a horizontal orientation at bottom.
  This requires major surgery, and if the ESRI map every changes substantially
  it will all be lost. It's probably not worth doing again.
 */

.size-mode-SMALL #widget_11 {
  flex-flow: row !important;
  align-items: flex-end !important;
}

.size-mode-SMALL #widget_11>div:nth-child(1),
.size-mode-SMALL #widget_11>div:nth-child(2) {
  width: auto !important;
}

.size-mode-SMALL #widget_11>div:nth-child(1) {
  flex-grow: 1;
}

.size-mode-SMALL #widget_11>div:nth-child(2) {
  justify-content: flex-end !important;
  flex-grow: 0 !important;
}

.size-mode-SMALL #widget_11>*:nth-child(n + 3) {
  display: none !important;
}

.size-mode-SMALL .esri-locate {
  margin-left: 10px !important;
}

.size-mode-SMALL #widget_11>div:nth-child(2)>div:nth-child(1) {
  display: none !important;
}

.size-mode-SMALL #widget_11:first-child>div:nth-child(2)>div:nth-child(1) {
  display: block !important;
}

.size-mode-SMALL #widget_11>div:nth-child(2)>div:nth-child(2) {
  flex-direction: row !important;
  position: relative !important;
  margin-left: 0;
  padding-left: 0 !important;
  padding-bottom: 0 !important;
}

/* Shift search result box to show above field rather than below. */
.size-mode-SMALL .esri-search__container .esri-menu {
  top: auto !important;
  bottom: 100% !important;
  margin: 0 0 2px 0 !important;
}

/* Remove top margin on icons and their containers. */
.size-mode-SMALL #widget_11>div:nth-child(2)>div:nth-child(2)>div:nth-child(2),
.size-mode-SMALL #widget_11>div:nth-child(2)>div:nth-child(2)>div:nth-child(2)>div:nth-child(2),
.size-mode-SMALL #widget_11>div:nth-child(2)>div:nth-child(2)>div:nth-child(2)>div:nth-child(3) {
  margin-top: 0 !important;
}

/* Hide the home button and zoom buttons on mobile. */
.size-mode-SMALL .esri-home,
.size-mode-SMALL .esri-interactive {
  display: none;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * Map controls: tablet/desktop
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

/* Shift the map icons back up away from bottom panel. */
#widget_11:last-child {
  margin-bottom: 1px;
}

/* Get rid of the spacer control before the main control block that prevents it from floating left. */
.size-mode-MEDIUM #widget_11:last-child>div:first-child>div:first-child,
.size-mode-LARGE #widget_11:last-child>div:first-child>div:first-child {
  display: none;
}

/* Remove needless left margin on primary control block now that it is floated left. */
.size-mode-MEDIUM #widget_11:last-child>div:first-child>div:last-child,
.size-mode-LARGE #widget_11:last-child>div:first-child>div:last-child {
  margin-left: 0 !important;
}

/* Allow the primary controls to float to the top and flow as and within a flex object. */
.size-mode-MEDIUM #widget_11,
.size-mode-LARGE #widget_11 {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
}

/* Give the first control sub-box some space. */
.size-mode-MEDIUM #widget_11:first-child,
.size-mode-LARGE #widget_11:first-child {
  top: auto !important;
  left: auto !important;
  margin: 15px 0 10px 15px;
}

/* Adjust margin on basemap control. */
.size-mode-MEDIUM #widget_11:first-child>div:nth-child(2),
.size-mode-LARGE #widget_11:first-child>div:nth-child(2) {
  margin: 10px 0 0 0 !important;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * Detail popup
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

/* Hide dock button. */
.esri-popup__button.esri-popup__button--dock {
  display: none;
}

/* Hide zoom button. */
.esri-popup__footer .esri-popup__button {
  display: none !important;
}

/* Bold the labels. */
.esri-widget__table tr th {
  font-weight: bold !important;
}

/* Simplify the close button. */
body .esri-popup__button {
  background: none !important;
  border: none !important;
}

/* Adjust the padding around the content. */
.esri-popup .esri-feature__content-element {
  padding: 0 0 0px 0 !important;
}

/* Hide popup pointer. */
.esri-popup__pointer {
  display: none !important;
}

/* Move popup away from outage icon a touch. */
.esri-popup--aligned-top-center {
  transform: translate(0, -10px);
}

/* Round the corners. */
.esri-ui .esri-popup,
body .esri-popup__main-container {
  border-radius: 15px 15px 0 0;
}

/* Remove existing table stylings, set consistent background color */
table.esri-widget__table {
  line-height: 1.1em !important;
  background-color: #F0F0F0;
}

.esri-widget__table tr:nth-child(odd) {
  background: none !important;
}

.esri-widget__table tr:nth-child(even) {
  background: none !important;
}

table.esri-widget__table tr th {
  border-right: none !important;
}

/* Add extra padding at bottom of mobile list only. */
.esri-view-width-less-than-medium article {
  padding-bottom: 20px;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * Basemap
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

/* Hide all but the first four basemaps. */
ul.esri-basemap-gallery__item-container li:nth-child(n+5) {
  display: none;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * Basemap : Mobile
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

/* On mobile, snap the panel to the bottom of the whole page. */
.size-mode-SMALL [data-uniqueid="popper_1"] {
  inset: auto auto 0px 0px !important;
  transform: none !important;
  border: none !important;
}

/* On mobile, add some padding to the bottom of the panel and let it be as tall as it wants. */
.size-mode-SMALL [data-uniqueid="popper_1"] .expand-mobile-panel {
  height: auto !important;
  padding-bottom: 9px;
}

/* On mobile, hide the handle for expanding the panel. */
.size-mode-SMALL [data-uniqueid="popper_1"] .expand-mobile-panel-bar {
  display: none !important;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * Basemap : Tablet & Desktop
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

/* Round the corners of the basemap dialog. Also affects search box. */
[data-uniqueid="popper_0"].exbmap-ui-popper,
[data-uniqueid="popper_0"].exbmap-ui-popper .exbmap-ui-expand-content {
  border-radius: 15px !important;
}

.esri-basemap-gallery {
  border-radius: 0 0 15px 15px;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * Custom buttons
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

#customButtonContainer {
  position: absolute;
  top: 60px;
  right: 0;
  z-index: 1000;
  display: flex;
  flex-direction: row;
}

#customButtonContainer button {
  background: #ffb036;
  border: 1px solid #ffb036;
  margin-right: 15px;
  margin-top: 15px;
  text-transform: uppercase;
  font-size: 12px;
  padding: 6px 9px;
}

.size-mode-SMALL #customButtonContainer button {
  margin-right: 10px;
  margin-top: 10px;
}

#customButtonContainer #refreshButton {
  background: white;
  border: 1px solid var(--light-800);
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * Screen reader link to table
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

/* The link will not be visible unless tabbed to, but will be read by a screen reader. */
#skip-to-table-view a {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

#skip-to-table-view a:focus {
  position: static;
  width: auto;
  height: auto;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * Screen reader table
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

#outage-table tbody tr:nth-child(odd) {
  background-color: #eaeaea;
}

#outage-table tbody tr:nth-child(odd) td {
  border-top: 1px solid #ddd;
}

#outage-table th,
td {
  text-align: left;
  padding: 7px;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * Custom Notice (Downtime)
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

#customNotice {
  position: absolute;
  z-index: 1000;
  background: white;
  width: 283px;
  padding: 16px;
  font-size: 20px;
  top: 60px;
  margin-top: 15px;
  display: none;
}

#customNotice em {
  color: red;
  font-weight: bold;
  font-style: normal;
  padding: 0 10px 0 0;
  font-size: 26px;
}

#customNotice .noticeHeading {
  font-size: 24px;
  text-transform: uppercase;
  font-weight: bold;
}

#customNotice .collapseNotice {
  width: 48px;
  height: 48px;
  right: 0;
  top: 0;
  position: absolute;
}

#customNotice .collapseNotice:hover {
  text-decoration: none;
  cursor: pointer;
}

#customNotice .collapseNotice span {
  border-left: 1px solid black;
  border-top: 1px solid black;
  width: 12px;
  height: 12px;
  display: block;
  transform: rotate(-45deg);
  margin: 28px 0 0 16px;
}

#customNotice p {
  margin-bottom: 0;
  line-height: 1.3 !important;
}

/* mobile */
.size-mode-SMALL #customNotice {
  transform-origin: top left;
  transform: scale(80%);
}

/* collapse mode */
#customNotice.collapsed {
  width: 72px;
}

#customNotice.collapsed .noticeHeading {
  display: none;
}

#customNotice.collapsed p {
  display: none;
}

#customNotice.collapsed .collapseNotice span {
  transform: rotate(135deg);
}
