/* station.css */

/* General Styles */
body {
    margin: 0;
    padding: 0;
    text-align: center !important;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
}

/* Header Styles */
h1.noPrint {
    margin: 0;
    padding-bottom: 0;
}

nav.member-links {
    margin: 0;
    padding: 0;
    line-height: 1;
}

header {
    text-align: center;
    padding: 0 5px 0 5px;
    margin-bottom: 0;
}

.header-logo {
    margin: 0 auto;
}

.header-nav {
    font-size: 14px;
    padding: 10px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.breadcrumb {
    background-color: #fff;
    padding: 8px 15px 0 15px;
    border-bottom: 1px solid #ddd;
}

.breadcrumb ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
}

.breadcrumb li {
    margin-right: 5px;
}

.breadcrumb li:after {
    content: ">";
    margin-left: 5px;
    color: #0000FF;
}

.breadcrumb li:last-child:after {
    content: "";
}

.header-nav a {
    text-decoration: none;
    color: #0000FF;
}

.header-nav .separator {
    margin: 0 10px;
    color: #0000FF;
}

.member-links {
    display: inline-block;
    margin-left: 10px;
    line-height: 1;
    vertical-align: top;
}

.member-links a {
    margin-left: 10px;
}

.member-links a:first-child {
    margin-left: 0;
}

/* Main Content Styles */
main {
    margin: 0 auto;
    text-align: center !important;
    width: 100%;
}

.stationPage {
    width: 100%;
    overflow-x: hidden;
    text-align: center !important;
    display: flex;
    flex-direction: column;
    align-items: center;
}



/* Map Canvas Styles */
#map-canvas {
    width: 100%;
    height: 500px;
    max-width: 688px;
    margin: 0 auto;
}

/* Tides Box and Tab Buttons */
.stationPage .tides-box.noPrint {
    margin: 5px auto !important;
    text-align: center !important;
    max-width: 688px;
    width: 100%;
}

.stationPage .tides-box.noPrint .intro-text {
    text-align: center !important;
    margin: 0 auto !important;
    width: 100%;
    display: block !important;
}

.stationPage .tides-box.noPrint .tab-buttons {
    overflow: hidden;
    border-bottom: 1px solid #ccc;
    display: flex !important;
    justify-content: center !important;
    margin: 5px auto !important;
    text-align: center !important;
    width: 100%;
    max-width: 688px;
}

.tab-button {
    padding: 4px 12px;
    cursor: pointer;
    background: #f1f1f1;
    border: 1px solid #ccc;
    border-bottom: none;
    font-size: 14px;
}

.tab-button.active {
    background: #fff;
    font-weight: bold;
}

.tab-button.icon-tab {
    padding: 8px;
}

.tab-button.icon-tab img {
    vertical-align: middle;
    width: 30px;
    height: 30px;
}

/* Tab Container and Content */
.tab-container {
    width: 100%;
    max-width: none !important;
    flex-shrink: 0;
}

.tab-content {
    display: none;
    padding: 2px 0 5px 0;
    overflow-x: hidden;
    width: 100%;
    text-align: center !important;
    margin: 0 auto;
}

.tab-content.active {
    display: block;
}

/* Consolidated Styles for All Tabs under stationPage */
.stationPage .tab-content {
    max-width: 688px;
    margin: 0 auto;
    text-align: center !important;
}

/* Calendar Tab Specific Styles */
.stationPage #calendar-content {
    border-top: none;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.stationPage #calendar.tab-content,
.stationPage #calendar.tab-content > * {
    text-align: center !important;
    margin-left: auto;
    margin-right: auto;
}

.stationPage #calendar.tab-content h2,
.stationPage #calendar.tab-content .tides-box,
.stationPage #calendar.tab-content .bizCalendarHeader,
.stationPage #calendar.tab-content p,
.stationPage #calendar.tab-content div {
    text-align: center !important;
    margin: 0 auto;
}

.stationPage #calendar.tab-content p.today-tides {
    text-align: center !important;
    margin: 0 auto !important;
    width: 100%;
}

.stationPage #calendar.tab-content .calendar-scroll-wrapper {
    width: 100%;
    max-width: 688px;
    margin: 0 auto;
}

/* Chart Tab Specific Styles */
.stationPage #chart.tab-content h1 {
    margin: 5px 0;
    font-size: 24px;
    font-weight: bold;
}

.stationPage #chart.tab-content .day-nav {
    margin: 5px auto;
    display: flex;
    justify-content: center;
}

.stationPage #chart.tab-content .day-nav table {
    margin: 0 auto;
}

.stationPage #chart.tab-content .day-nav td {
    padding: 0 5px;
}

.stationPage #chart.tab-content img {
    max-width: 100%;
    height: auto;
}

/* Table Tab Specific Styles */
.stationPage #tidetable.tab-content {
    text-align: center !important;
}

.stationPage #tidetable.tab-content .tides-box {
    border-top: none;
}

.stationPage #tidetable.tab-content > * {
    text-align: center !important;
    margin-left: auto;
    margin-right: auto;
}

.stationPage #tidetable.tab-content h2,
.stationPage #tidetable.tab-content .tides-box,
.stationPage #tidetable.tab-content p,
.stationPage #tidetable.tab-content div {
    text-align: center !important;
    margin: 0 auto;
}

.stationPage #tidetable.tab-content table {
    margin: 0 auto !important;
}

/* Compact Layout for Tide Table */
.stationPage #tidetable.tab-content .tides-box table.tide_stats {
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    font-size: 12px !important;
}

.stationPage #tidetable.tab-content .tides-box table.tide_stats tr {
    line-height: 1.2 !important;
    height: auto !important;
}

.stationPage #tidetable.tab-content .tides-box table.tide_stats td {
    padding: 2px 2px !important;
    margin: 0 !important;
    line-height: 1.2 !important;
    vertical-align: middle !important;
}

/* Tide Table Scrolling Wrapper */
.stationPage #tidetable.tab-content .table-scroll-wrapper {
    width: 100%;
    max-width: 688px;
    margin: 0 auto;
}

/* Map Tab Specific Styles */
.stationPage #map.tab-content {
    border: none;
    height: auto !important;
    max-width: 688px;
    margin: 0 auto;
}

/* General Content Styles */
h1 {
    margin: 5px 0;
    text-align: center !important;
    font-size: 20px;
    font-weight: bold;
}

h2 {
    margin: 0;
    padding: 0;
    text-align: center !important;
    font-size: 18px;
    font-weight: bold;
}

.tides-box {
    margin: 5px 0;
    text-align: center !important;
    font-size: 14px;
}

.tides-box div,
.tides-box p {
    text-align: center !important;
    margin: 0 auto;
}

.stationPageNav {
    margin: 0px 0;
    text-align: center !important;
}

.stationPageNav table {
    margin: 0 auto;
    font-size: 14px;
    border-spacing: 5px;
    border-collapse: separate;
}

.stationPageNav td {
    padding: 0 5px;
}

.stationPageNav td a {
    white-space: nowrap;
}

.bizCalendarHeader {
    text-align: center !important;
    font-size: 14px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 688px;
}

.bizCalTitleName {
    font-size: 16px;
    font-weight: bold;
    text-align: center !important;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    margin: 0;
}

#tides-box-inner {
    text-align: center !important;
    font-size: 14px;
}

#tidetable table {
    font-size: 12px;
    margin: 0 auto !important;
}

.logoQr,
.bizCalQrCode {
    display: inline-block;
    margin: 0 auto;
}

.tide-popup {
    display: none;
    position: absolute;
    background: #fff;
    border: 1px solid #ccc;
    padding: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 1000;
    font-size: 12px;
    max-width: 250px;
    text-align: left;
    transition: opacity 0.2s ease-in-out;
    opacity: 0;
}

.tide-popup[style*="display: block"] {
    opacity: 1;
}

.tide-day:hover {
    position: relative;
    cursor: pointer;
}

.weather-warning {
    background: #ffe6e6;
    padding: 10px;
    margin-bottom: 20px;
    border-left: 5px solid #ff0000;
}

/* Weather Alert and Forecast Styles */
.weather-alert {
    background-color: #ffe6e6;
    border: 2px solid #ff3333;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

.weather-forecast {
    background-color: #f0f8ff;
    border: 1px solid #4682b4;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

.weather-alert h3,
.weather-forecast h3 {
    margin-top: 0;
    color: #333;
}

.weather-alert p,
.weather-forecast p {
    margin: 5px 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #ccc;
}

.weather-forecast p:last-child {
    border-bottom: none;
}

/* Chart Tab Styles */
.chart-image-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 550px;
}

.chart-image-container img {
    max-width: 100%;
    height: auto;
}

/* Override inline styles for blurred image */
.chart-image-container .blurred-image {
    width: 100% !important;
    height: auto !important;
    max-width: 550px;
}

/* Swiper Slider Styles */
.swiper-container {
    width: 100%;
    max-width: 550px;
    margin: 5px auto;
    padding: 0;
    overflow: hidden;
    position: relative;
}

.swiper-slide p {
    font-size: 14px;
}

.swiper-slide {
    width: 100% !important;
    max-width: 550px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    background: #fff;
    box-sizing: border-box;
    padding: 5px 5px;
    flex-shrink: 0;
}

.swiper-slide h2 {
    margin: 0 0 2px 0;
    font-size: 16px;
}

.swiper-slide p {
    margin: 0 0 2px 0;
    font-size: 12px;
}

.swiper-wrapper {
    display: flex;
    align-items: stretch;
}

.swiper-button-next,
.swiper-button-prev {
    color: #007bff;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    margin-top: 0;
}

.swiper-button-next {
    right: 10px;
}

.swiper-button-prev {
    left: 10px;
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 20px;
}

.chart-image-container {
    margin: 0 auto;
}

/* Ensure map container is responsive */
.stationPage #map.tab-content {
    max-width: 688px;
    width: 100%;
    margin: 0 auto;
    overflow-x: hidden;
}

/* Map canvas styles */
#map-canvas.stationPageMap {
    width: 100%;
    max-width: 688px;
    height: 500px;
    margin: 0 auto;
    display: block;
}


    .stationPage #map.tab-content {
        max-width: 100%;
    }
    #map-canvas.stationPageMap {
        height: 400px;
        max-width: 100%;
        width: 100%;
    }
}

@media (max-width: 480px) {
    #map-canvas.stationPageMap {
        height: 300px;
        max-width: 100%;
        width: 100%;
    }
}

@media (max-width: 600px) {
    .stationPage .tab-content {
        max-width: 100%;
    }
    .swiper-container {
        max-width: 100%;
    }
    .swiper-slide {
        width: 100% !important;
        max-width: 100%;
        padding: 3px 3px;
    }
    .swiper-slide h2 {
        font-size: 14px;
        margin: 0 0 1px 0;
    }
    .swiper-slide p {
        font-size: 11px;
        margin: 0 0 1px 0;
    }
    .chart-image-container {
        max-width: 100%;
    }
    .chart-image-container img {
        max-width: 100%;
        max-height: 400px;
    }
    .chart-image-container .blurred-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .swiper-button-next {
        right: 5px;
    }
    .swiper-button-prev {
        left: 5px;
    }
    .swiper-button-next,
    .swiper-button-prev {
        width: 30px;
        height: 30px;
    }
    .swiper-button-next::after,
    .swiper-button-prev::after {
        font-size: 16px;
    }
}

/* Additional Mobile Adjustments */
@media (max-width: 767px) {
    .stationPage #calendar.tab-content .calendar-scroll-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .stationPage #calendar.tab-content .calendar-scroll-wrapper::-webkit-scrollbar {
        display: none;
    }
    .stationPage #calendar.tab-content .calendar-scroll-wrapper table.tide_calendar_wrapper {
        width: auto;
        min-width: 672px;
    }
    .stationPage #tidetable.tab-content .table-scroll-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .stationPage #tidetable.tab-content .table-scroll-wrapper::-webkit-scrollbar {
        display: none;
    }
    .stationPage #tidetable.tab-content .table-scroll-wrapper table.tide_stats {
        width: auto;
        min-width: 800px;
    }
}

@media print {
    @page {
        size: auto;
        margin: 0.5in;
    }
    .tab-content {
        display: none !important;
    }
    .tab-content.active {
        display: block !important;
        overflow: hidden !important;
        padding: 0 !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }
    .stationPage #calendar.tab-content {
        max-width: none !important;
        width: 100% !important;
        overflow-x: visible !important;
        overflow-y: visible !important;
        padding: 0 !important;
        margin: 0 !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
    }
    .stationPage #calendar.tab-content h2,
    .stationPage #calendar.tab-content .tides-box,
    .stationPage #calendar.tab-content .bizCalendarHeader,
    .stationPage #calendar.tab-content p,
    .stationPage #calendar.tab-content div {
        margin: 0 auto !important;
        font-size: 12pt !important;
    }
    .stationPage #tidetable.tab-content .tides-box table.tide_stats {
        border-collapse: collapse !important;
        border-spacing: 0 !important;
        font-size: 10pt !important;
    }
    .stationPage #tidetable.tab-content .tides-box table.tide_stats tr {
        line-height: 1.2 !important;
        height: auto !important;
    }
    .stationPage #tidetable.tab-content .tides-box table.tide_stats td {
        padding: 1px 1px !important;
        margin: 0 !important;
        line-height: 1.2 !important;
        vertical-align: middle !important;
    }
    .blurredGraph {
        filter: blur(4px);
        cursor: pointer;
    }
    #chart.tab-content {
        max-height: 9in !important;
        page-break-inside: avoid !important;
        page-break-after: avoid !important;
    }
    #chart.tab-content img {
        max-width: 100% !important;
        width: 7in !important;
        height: auto !important;
        max-height: 6in !important;
        display: block !important;
        margin: 0 auto !important;
        padding: 0 !important;
        page-break-inside: avoid !important;
    }
    #chart.tab-content h2 {
        font-size: 16pt !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    #chart.tab-content .day-nav {
        margin: 0 !important;
        padding: 0 !important;
    }
    #chart.tab-content .tides-box {
        margin: 0 !important;
        padding: 0 !important;
    }
    #chart.tab-content .tides-box p {
        margin: 0 !important;
        padding: 0 !important;
        font-size: 12pt !important;
    }
    .bizCalQrCode {
        display: block;
    }
    .noPrint {
        display: none !important;
    }
    body,
    html,
    main,
    .stationPage,
    .tab-container {
        margin: 0 !important;
        padding: 0 !important;
        height: auto !important;
        overflow: hidden !important;
    }
    h2,
    .day-nav,
    .tides-box,
    img {
        page-break-inside: avoid !important;
        page-break-before: avoid !important;
        page-break-after: avoid !important;
    }
    .header {
        display: none;
    }
}