*, *::before, *::after {
	box-sizing: border-box;
}

.visually-hidden {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0,0,0,0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

@media screen and (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }
}

[popover] {
  inset: auto;
}

article, aside, figure, footer, header, hgroup, menu, nav, section { display:block; }

html{
    font-size: 100%;
    height:100%;
    position:relative;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    border:0;
    font-family : system-ui, sans-serif;
    font-size : 1rem;
    color: #000;
    height: 100%;
    line-height: 1.3;
    background-color: #C5E5F5;
}

h1, h2, h3, h4, h5, h6, blockquote, figcaption {
	text-wrap: balance;
}

h1 {
        font-size : 1.5rem;
}
h2 {
        font-size : 1.3rem;
}
h3 {
        font-size : 1.1rem;
}
h4 {
        font-size : 1.1rem;
}
h5 {
        font-size : 1.1rem;
}
.secondary-heading { color: #333399; }
p, dd, li {
  text-wrap: pretty;
}

/*   Display of block causes issues with flow.  maybe inline-block?  but not in all cases. */
/* img {
	display: block;
	max-width: 100%;
}
*/

img { 
	border: none;
}

img.responsive {
	display: block;
	max-width: 100%;
	height: fit-content;
	object-fit: contain;
}

ul.resource-list li {
	margin-block:0.25em;
}

pre.wide-layout {
        margin-inline: 1em;
        padding: 0.5em;
        overflow-x: auto;
}

.smallertext { font-size: 0.8rem; }

sup { font-size: 0.75rem; }

a[target="_blank"]::after {
	content: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAQElEQVR42qXKwQkAIAxDUUdxtO6/RBQkQZvSi8I/pL4BoGw/XPkh4XigPmsUgh0626AjRsgxHTkUThsG2T/sIlzdTsp52kSS1wAAAABJRU5ErkJggg==);
	margin: 0 0.1em 0 0.25em;
}
:not(p.notice) > a[href$=".pdf" i]::after {
	content: "PDF";
	background-color: #ccc;
	border-radius: 100vh;
	margin-left: 0.5em;
	padding: 0.25em 0.5em;
	font-weight: bold;
}

.skip-nav-link {
  position: absolute;
  z-index: 10;
  background: #fff;
  border-radius: 0 0 0.5rem 0.5rem;
  padding: 0.25em 1em;
  left: 0.5em;
  transform: translateY(-120%);
  transition: transform 250ms ease-in;
}

.skip-nav-link:focus-visible {
  transform: translateY(0);
}

/* ********** Header ********** */
.header {
	max-width:100%;
	margin:0 auto;
}

.banner {
	display: flex;
	gap: 0.5em;
	margin:0 auto;
	line-height: 1;
	border-bottom: 1px solid #94C6EF;
}

.header-noaa-link,
.header-nws-link {
	/* max-width: 6.6%; */
}
.header-ndbc-link {
	/* max-width: 69.8%; */
}
.header-doc-link {
	/* max-width: 17%; */
	margin-left: auto;
}

.header-noaa-icon {
	width: 100%;
	border: none;
}

.header-nws-icon {
	width: 100%;
	border: none;
}

.header-ndbc-icon {
	width: 100%;
	border: none;
}

.header-doc {
	width: 100%;
	object-fit: contain;
	border: none;
}


/* **************notice************* */
.notice {
	font-weight: bold;
	margin-block: 0.5em;
	color: #000;
	text-decoration: none;
	background-color: #ffbaba; /* fallback for no gradient */
	background: linear-gradient(#fff0f0, #ffcccc);
	border-radius: 0.5em;
	border: 2px solid #c33;
	padding: 0.25em 1em;;
	max-width: fit-content;
}
.notice img {
	vertical-align: middle;
}

.station-notice {
        color: black;
        border: 2px solid #c33;
	border-radius: 0.5em;
	padding: 0.5em;
	max-width: fit-content;
}

.warn {
	color: #c33;
}
.warn-highlight, .error {
	color: #c33;
	font-weight: bold;
}

.fcst {
	max-width: 70ch;
}
.fcst-hdr {
	font-weight: bold;
}
.fcst-day {
	font-weight: bold;
}

/* **************form controls************* */
.ndbc-button {
	background-color: #ccc;
	padding: 0.25em 0.5em;
	border-radius: 10px;
	font-weight: bold;
	cursor: pointer;
}
.ndbc-button:hover {
	background-color: #e7e7e7;
}

/* **************center************* */
.text-center {   /* TODO misnamed - not text */
	margin-inline: auto;
}
.img-center {
	display: block;
	margin-inline: auto;
}

.web-page {
	max-width: 62rem;
	min-height: 100%;
	background-color: white;
	margin: 0 auto;
	box-shadow: -3px 0 3px #ccc, 3px 0 3px #ccc;
}

.narrow-page {
	max-width: 70ch;
}

.main-content {
	max-width:100%;
	margin-inline:auto;
        padding: 0.25em 1em;
}

main a {
	overflow-wrap: anywhere;
}

.float-right {
	float: right;
}

.float-left {
	float: left;
}

p img.float-left { margin-right: 0.5em; }
p img.float-right { margin-left: 0.5em; }

/* **********Top Menu************* */
.nav-container {
	display: flex;
	justify-content: space-between;
	align-items: center;
        background:#f4f4f4;
	border-bottom:1px solid #94C6EF; 
}

.mobile-nav-toggle {
	display: none;
	order: 2;
	align-self: flex-start;
}

.bar1, .bar2, .bar3 {
  display: block;
  width: 22px;
  height: 2px;
  /*background-color: #333;*/
  background-color: dimgray;
  border-radius: 1px;
  /*transition: 0.4s;*/
}
.bar2, .bar3 {
  margin-top: 4px;
}

.change .bar1 {
  transform: translate(0, 4px) rotate(-45deg);
}

.change .bar2 {opacity: 0;}

.change .bar3 {
  transform: translate(0, -4px) rotate(45deg);
}

.topnav {
	width:100%;
	margin: 0 auto;
	padding-inline: 1rem;
	order: 1;
}

/* Primary List Configuration Section */
#topnav {
	margin:0; 
	padding:0;
	width:100%;
	list-style:none;
	font-size:0.66rem;
	display: flex;
	justify-content: space-between;
	z-index: 9999;
}

#topnav li {
	margin:0; 
	padding:0;
        position:relative;
	display:block;
        padding-left:0px;
	padding-right:0px;
	color:#104070;
	width:auto;
	font-size:0.83rem;
}

#topnav li a {
	text-indent:0;
	height:auto;
	padding:5px;
	display:block;
	text-decoration:none;
}

/* Drop Down Menu Hide and Show section */
#topnav .drop {
	display: none;
	position:absolute;
	background-color: #f4f4f4;
	text-align:left;
	padding:15px 15px 15px;
	box-shadow:0px 2px 5px #444444;
	z-index:10000;
	width:14em;
	border-radius: 0 0 0.5em 0.5em;
}


 * #topnav .section-link.has-dropdown a::after {
	content: '\25BC';
}

#topnav .section-link.has-dropdown.open a::after {
	content: '\25B2';
}


#topnav .section-link.open + .drop-left {
	display: block;
}

#topnav .section-link.open + .drop-right {
	right:0;
	display: block;
}

#topnav .dropsearch {
	display: none;
        position:absolute;
	background-color: #f4f4f4;
        text-align:left;
        padding:5px 5px 5px;
        box-shadow:0px 2px 5px #444444;
        z-index:10000;
        width:18em;
	border-radius: 0 0 0.5em 0.5em;
}

#topnav .section-link.open + .dropsearch {
        left:auto;
	display: block;
}


/* Top Menu Link Text Section */
#topnav .section-link a {
        color:#003366;
        color:#104070;
        text-indent:0;
        text-decoration:none;
        height:auto;
        font-size:0.83rem;
        text-transform:uppercase;
	cursor: pointer;
}

#topnav .section-link a:hover,
#topnav .section-link a:focus {
	text-shadow:1px 1px 1px gray; 
}

/* Drop Down Menu Link and Border section */
#topnav .drop a{
	color:#003366;
	font-size:0.83rem;
}

#topnav .drop ul li {
        margin-left:-40px
}

#topnav .drop a:hover,
#topnav .drop a:focus {
	background-color: #ccc;
	border-radius: 0.5em;
}

/* Site Search Settings Section */
#topnav .site-search {
	font-size:0.83rem;
	font-weight:normal;
}

.buoycam {
	display: block;
	max-width: 100%;
	aspect-ratio: 9.6 / 1;
}

.notices {
	display: flex;
	gap: 0.5em;
	flex-direction: column;
	margin-block: 0.5em;
}
.notices > * {
	margin-block: 0;
}

.notices:empty {
	display:none;
}

.notices:not(:has(*)) {
	display:none;
}

.station-search {
	padding-block: 0.25em;
	border-bottom: 1px solid #ccc;
	display: flex;
	gap: 1em;
	justify-content: flex-start;
}
.station-search label {
	font-weight: bold;
}
.station-search .station-input {
	width: 10ch;
}

/************* toggle control ***************************/
.toggle-container {
	display: flex;
	align-items: center;
}

.toggle-container label {
	cursor: pointer;
}

.toggle {
	appearance: none;
	position: relative;
	border: 0;
	outline: 0;
	cursor: pointer;
}

/* To create surface of toggle button */
.toggle::after {
	content: '';
	width: 2.5rem;
	height: 1.25rem;
	display: inline-block;
	background-color: #ccc;
	border-radius: 0.7rem;
	border: 1px solid #2c2c2c;
}


/* Contents before checkbox to create toggle handle */
.toggle::before {
	content: '';
	width: 1rem;
	height: 1rem;
	display: block;
	position: absolute;
	left: 0.2rem;
	top: 0.1rem;
	border-radius: 50%;
	background-color: ghostwhite;
	box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
}

/* Shift the handle to left on check event */
.toggle:checked::before {
	left: 1.3rem;
	box-shadow: -1px 1px 3px rgba(0, 0, 0, 0.6);
}
/* Background color when toggle button will be active */
.toggle:checked::after {
	background-color: dodgerblue;
}

/* Transition for smoothness */
.toggle,
.toggle::before,
.toggle::after,
.toggle:checked::before,
.toggle:checked::after {
	transition: background-color ease 0.3s, left ease 0.3s;
}

/************* table of contents ********************** */
.page-with-toc {
	display: grid;
	grid-template: "page toc" / 1fr minmax(30%,10em);
}
.page-body {
	grid-area: page;
}
.page-toc {
	grid-area: toc;
	position: sticky;
	top: 0;
	align-self: start;
	max-height: 90vh;
	overflow-y: auto;
}
.page-toc p:nth-of-type(1) {
	margin-block: 0.1em;
}
.page-toc ul {
	list-style: none;
	margin-block: 0.25em;
	border-left: 2px solid #999;
}
.page-toc li {
	margin-block: 0.5em;
}

/************* data tables********************** */
.left { text-align: left; }
.center { text-align: center; }
.right { text-align: right; }
.bottom { vertical-align: bottom; }
.middle { vertical-align: middle; }
.top { vertical-align: top; }
.nowrap { white-space: nowrap; }

.dataTable-wrapper {
	max-width: 100%;
	padding-right: 0.5em;
	max-height: 95vh;
	overflow: auto;
	/* scroll-snap-type: both mandatory; */
}

.dataTable { border-collapse: collapse; }

table.dataTable caption {
	font-size:1.05rem;
	font-weight:normal;
	background-color:transparent;
	/* scroll-snap-align: start; */
	position: sticky;
	top: 0;
	text-align: left;
}

caption.titleDataHeader {
          font-size:1.4rem;
          font-weight:bold;
          background-color:transparent;
}

table.dataTable th,
table.dataTable td {
	/* scroll-snap-align: start; */
	background-clip: padding-box;
	padding: 0.25em;
}

table.dataTable > thead {
	position: sticky;
	top: 0;
	z-index: 20;
	background-color: #f4f4f4;
}
table.dataTable > thead th:first-child,
table.dataTable > thead td:first-child {
	position: sticky;
	left: 0;
	z-index: 30;
	background-color: #f4f4f4;
}
/*table.dataTable > tbody {
	position: relative;
}*/
table.dataTable > tbody th { 
	background-color: #f4f4f4;
	position: sticky;
	left: 0;
	z-index: 10;
	padding-right: 1em;
	white-space: nowrap;
}
table.dataTable > tbody th,
table.dataTable > tbody td {
	vertical-align: top;
}
.dataTable tbody tr:nth-child(odd) {
	background-color:#fffff0;
}
.dataTable tbody tr:nth-child(even) {
	background-color:#f0f8fe;
}
.dataTable tbody tr:hover * {
    background-color: #d8d8d8;
}
/*----*/
.dataTable .wide-left {
	padding-left: 3em;
}

/********** Legend Specific *********/
.legend-icon {
	vertical-align: middle;
}

/************** Social Media Links ************/
.socialMediaContainer {
        display:flex;
	flex-wrap: wrap;
        gap:1em;
}

.socialMediaLogo {
        vertical-align:bottom;
}

a.socialMediaLink {
        text-decoration:none;
}

/* ***********footer**************** */

.footer {
	max-width: 100%;
	margin: 0 auto;
	padding-inline: 0;
	font-size: 0.75rem;
}

.footer-content {
	padding: 1em;
	margin-inline: auto;
	line-height: 1;
	display: flex;
	flex-wrap: wrap;
	gap: 2rem;
	justify-content: space-between;
	background-color: #ebf8fe;
	border-top: 4px double #1763ab;
	border-bottom: 4px double #1763ab;
	}

.footer-column {
	max-width: 15rem;
	padding: 0;
	padding-bottom: 1em;
	margin: 0;
        text-align: left;
	line-height: 1.5em;
	color: #1763ab;
}

*.footer-column-head, *.footer-column-head a:link, *.footer-column-head a:visited {
	text-transform: uppercase;
	/*color: #ed7a08 !important;*/
	font-weight: bold;
	font-size: 0.875rem;
	height: auto !important;
	margin-bottom: 0px !important;
}

*.footer-column a:link, .footer-column a:visited {
	color: #1763AB;
	text-decoration: none;
}	

.footer-column a:hover,
.footer-column a:focus {
	text-decoration: underline;
} 

a.footer-column-head:hover {
	text-decoration: none;
} 

/* ********* Legal Footer Section ********** */
.footer-legal-content {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
	justify-content: space-between;
	margin: 0 auto;
	line-height: 1;
	padding-top: 1em;
}

.footer-legal-content a:link {
	text-decoration:none;
}

.footer-legal-content a:hover,
.footer-legal-content a:focus {
	text-decoration:underline;
}

.footer-legal-gov {
}

.footer-legal-column {
}

.footer-legal-column2 {
}

.footer-legal-column3 {
}

@media print {
	/* .skip-nav-link, .header, .topnav, .footer, .footer-legal { */
	.skip-nav-link, .topnav, .footer-content {
		display: none !important;
	} 
	.dataTable-wrapper { max-height: initial; }
}

@media screen and (max-width: 45em) {
	.mobile-nav-toggle {
		display: block;
		cursor: pointer;
		border: 0;
		padding: 0.5em;
	}
	#topnav {
		display: none;
		flex-direction: column;
	}
	#topnav[data-visible] {
		display: block;
	}
	#topnav .drop {
		width: auto;
		box-shadow:none;
	}
	#topnav .section-link.open  +.dropsearch {
		left:-1px;top:0.5em;padding-top: 0;
		box-shadow:none;
	}
	#topnav .section-link.open + .drop-left {
		left:0;top:0.5em;padding-top: 0;position:relative;
		background-color: #f4f4f4;
	}
	#topnav .section-link.open + .drop-right {
		left:0;right:auto;top:0.5em;padding-top: 0;position:relative;
		background-color: #f4f4f4;
	}
}
