﻿.camera-page-content-container {
    margin: 0 auto;
    width: 1200px;
    max-width: 100%;
    padding: 0 5px;
}
.camera-container {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin: 10px 5px;
}
.camera-header, .camera-buttons-blue {
    display: block;
    text-align: center;
}
.camera-header img, .camera-tracker img {
    width: 320px;
    max-width: 95%;
    height: auto;
    border: 2px solid #000000;
    border-radius: 8px;
}
.camera-contents {
    flex: 1;
    max-width: min(calc(100% - 180px), 800px); /* Sidebar Ad (160px) + Margins (20px) = -180px */
    margin: 0;
    text-align: center;
}
.camera-options-container, .camera-ports-map-container {
    width: 1200px;
    max-width: 100%;
    margin: 20px auto;
    text-align: center;
	background-color: #FFFFFF;
	border: 2px solid #000000;
	padding: 0 5px 10px 5px;
}
.camera-options-container p {
    text-align: left;
    margin: 10px;
}
.camera-additional-container {
    margin: 20px auto;
    max-width: 600px;
	background-color: #EDF6FD;
	border: 1px solid #000000;
    border-radius: 5px;
	padding: 0 5px;
}
.camera-additional {
    text-align: left;
    padding: 0 10px;
}
@media (max-width: 767px) {
    .camera-additional ol {
        padding-left: 15px;
    }
}
.camera-additional-title {
	font-size: 16px;
	font-weight: bold;
	text-align: center;
	margin: 10px 5px;
}
.camera-legend {
	text-align: center;
	margin: 10px;
}
.camera-region-cities {
	text-align: left;
    padding: 10px;
	columns: 350px 2;
}
.camera-region-cities ul {
    text-align: left;
    list-style: none;
    margin: 0;
    padding: 0 0 0 10px;
}
.camera-region-city-container {
    margin-bottom: 10px;
    break-inside: avoid-column;
}
.camera-region-city-name {
    margin-block-start: 0;
    margin-block-end: 0;
    font-weight: bold;
}
.camera-region-city-links {
    text-indent: 10px;
}
.webcam-list ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
}
.webcam-list li {
    text-align: center;
	padding: 10px;
    font-weight: bold;
	background: #dceaff;
	border: 1px solid #000000;
	break-inside: avoid-column;
	display: inline-block;
	vertical-align: top;
	width: 250px;
	margin: 10px 5px;
}
@media (max-width: 500px) {
    .webcam-list li { /* Force two equal columns on small screens */
        flex: 0 0 calc(50% - 10px);
        margin: 5px;
        box-sizing: border-box;
        width: 40vw;
    }
}
.ship-group ul {
    margin-top: 10px;
}
.webcam-sub-list li {
    border: none;
    flex: unset;
    padding: 0;
    margin: 5px 0;
    text-align: left;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.webcam-list li img {
	width: 200px;
	height: auto;
	border: 1px solid #2577b1;
	border-radius: 8px;
	box-shadow: 0 8px 6px -6px rgba(0, 0, 0, 1.0);
	margin-bottom: 5px;
}
.webcam-list ul li:hover a img {
    box-shadow: 0 10px 8px -8px rgba(0, 0, 0, 0.5);
    transform: scale(1.02);
    transition: transform 0.25s ease-in-out, box-shadow 0.25s ease-in-out;
}
.webcam-list li a:active img {
    box-shadow: none;
    border: 2px solid #333333;
	margin-bottom: 4px;
}
.camera-port-nearby ul, .camera-ship-additional ul {
    text-align: left;
    list-style: none;
    margin: 0;
    padding: 0 0 0 10px;
    text-indent: -10px;
}
.camera-search-title {
	margin: 10px 10px 5px 10px;
}
.camera-sidebar-right {
    flex: 0;
    width: 160px;
    margin: 0;
}
@media (max-width: 767px) {
    .camera-contents {
        max-width: 100%;
        margin: 0 auto;
    }
    .camera-sidebar-right {
        display: none;
    }
    .camera-below-ad {
        margin: 10px auto;
    }
}
@media all and (min-width: 518px) { /* minimize margins on weather */
    #imperial, #metric {
	    margin: 0 -42px 0 -48px;
    }
}
@media all and (max-width: 517px) { /* minimize margins on weather */
    #imperial, #metric {
	    margin: -40px -42px -30px -48px;
    }
}
.camera-image-container {
    position: relative;
    padding-top: 56.25%; /* recalculated on content-view */
    margin: 0 auto;
    background-color: #000000;
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #000000;
}
.camera-image {
    position: absolute;
    left: 0;
    top: 0;
    border: none;
    min-width: 100%;
    z-index: 1;
}
.camera-image img {
    vertical-align: middle;
}
.camera-issue-note {
    border: 5px double #FF0000;
    margin: 10px;
    padding: 10px;
    max-width: 800px;
    background-color: #c4d0dd;
}
.camera-issue-note a > i {
    font-size: 42px;
    padding: 10px;
}
.camera-issue-note a > svg {
    margin: .25em .2em;
    vertical-align: -.84em;
    height: 3em;
    width: auto;
}
.camera-line-contact {
    margin: 20px auto;
    max-width: 400px;
    border: 1px solid #000000;
    border-radius: 8px;
    background-color: #e4eaf0;
}
.camera-line-contact img {
    width: 200px;
    height: auto;
    margin: 10px;
    border: 1px solid #000000;
    border-radius: 8px;
    box-shadow: 0 8px 6px -6px rgba(0, 0, 0, 1.0);
}
.camera-tracker-container, .camera-map-container {
	margin: 20px auto;
    text-align: center;
    max-width: 1000px;
    background-color: #FFFFFF;
    border: 1px solid #000000;
    padding: 10px;
}
.camera-tracker img {
    box-shadow: 0 8px 6px -6px rgba(0, 0, 0, 1.0);
}
.camera-tracker a:hover img {
    transform: scale(1.02);
    transition: transform 0.25s ease-in-out, box-shadow 0.25s ease-in-out;
    box-shadow: 0 10px 8px -8px rgba(0, 0, 0, 0.5);
}
.camera-tracker a:hover .button-blue {
    text-decoration: underline;
}
.camera-tracker a:active img {
    box-shadow: none;
    border: 2px solid #333333;
}
.camera-tracker-note {
	margin: 10px;
}
.camera-loading {
    position: absolute;
	z-index: 2;
	left: calc(50% - 50px);
	top: calc(50% - 50px);
}
.camera-external-link a {
	font-family: Tahoma,Verdana,Geneva,sans-serif;
    font-weight: bold;
    font-size: 18px;
}
.camera-external-link img {
    height: 20px;
    width: 20px;
}
.camera-details-container {
	padding: 5px;
	margin: 0 auto;
	border: 1px solid #000000;
	background: #C4D0DD;
}
.camera-details-head {
	text-align: center;
	vertical-align: middle;
	border: 2px solid #000000;
	border-bottom: 3px solid #000000;
	border-radius: 10px;
	font-size: 14px;
	color: #FFFFFF;
	background-color: #6484a4;
	margin-bottom: 15px;
	padding: 5px;
}
.camera-details-head > .countdown {
    color: #000000;
}
.camera-description-title, .camera-date-time-title {
	font-weight: bold;
}
.camera-date-time, .camera-description {
	display: inline-block;
}
.camera-date-time i {
	padding-left: 5px;
}
.camera-details {
	margin: 10px;
}
.camera-copyright {
	margin-top: 20px;
	font-size: 12px;
	font-style: italic;
}
.camera-inservice {
    font-weight: normal;
}
.camera-map iframe {
    width: 100%;
    height: 450px;
    border: 1px solid #000000;
}
.camera-location-map-note {
    margin-top: 5px;
}
.camera-ports-map-buttons {
	display: block;
	text-align: center;
	margin-top: 10px;
}
#webcams-map {
    min-height: 600px;
	width: 100%;
}
.webcams-map-container {
    flex-grow: 1;
    position: relative;
    background: #2d2d2d;
    overflow: hidden;
}
.webcams-map {
    display: block;
    width: 100%;
    height: 600px;
    border: none;
    background: #2d2d2d;
    padding: 0;
    margin: 0 auto;
    border-right: 2px solid #999;
}
#webcams-map-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #2d2d2d;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 20;
    transition: opacity 1.5s ease-out;
    pointer-events: auto;
}
#webcams-map-loading.fade-out {
    opacity: 0;
    pointer-events: none;
}
.webcams-map-container .non-members-map {
    margin: 20px auto;
    min-height: 600px;
    background-image: url('/assets/images/webcams/port-cameras-map-bg.webp');
    background-position: center center;
}
.webcams-map-marker {
    width: 32px;
    height: 37px;
    background-image: url('/assets/images/webcams/port-camera-map-marker.png');
    background-size: 32px 37px;
}
.webcams-map-legend-container {
    margin: 0 5px;
    text-align: center;
}
.webcams-map-legend-box {
    display: inline-block;
    border: 2px solid #08196d;
    padding: 5px 10px;
    background-color: #f4f4f5;
    text-align: center;
    font-family: Tahoma,Verdana,Geneva,sans-serif;
}
.webcams-map-legend ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
}
.webcams-map-legend svg {
    height: 1em;
    font-size: 2.4rem;
    width: 22px;
    margin-bottom: -12px;
}
.webcams-map-legend-text {
    font-weight: normal;
    margin-right: 15px;
}
.webcam-expand-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 20px;
    z-index: 10;
    opacity: 0;
    transition: opacity 1.5s ease;
}
.webcam-expand-btn:hover::after {
    content: 'Enlarge Image';
    position: absolute;
    bottom: 100%; /* above the button */
    left: 50%;
    transform: translateX(-50%) translateX(-30px);
    margin-bottom: 8px;
    padding: 6px 10px;
    background: rgba(0,0,0,0.8);
    color: white;
    border-radius: 4px;
    font-size: 14px;
    white-space: nowrap;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.2s;
}
.webcam-expand-btn:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 2px;
    border: 6px solid transparent;
    border-top-color: rgba(0,0,0,0.8);
    z-index: 20;
}
dialog {
    max-width: 95vw;
    max-height: 95vh;
    border-radius: 8px;
    padding: 0;
    background: transparent;
}
dialog::backdrop {
    background: rgba(0,0,0,0.8);
}
.webcam-fullsize-img {
    max-width: 100%;
    max-height: 90vh;
    display: block;
}
.webcam-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 24px;
}
#imgERROR {
    display: none;
}
.webcam-report-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}
.modal-content {
    background: #fff;
    color: #000000;
    border: 4px solid #005298;
    padding: 20px 30px 30px;
    border-radius: 12px;
    max-width: 460px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    position: relative;
    min-height: 340px;
    max-height: 90vh;
    overflow-y: auto;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.modal-content h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 1.5em;
    flex-shrink: 0;
}
#modal-confirm-section {
    transition: opacity 0.3s ease;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
#modal-loading, #modal-result {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    opacity: 0;
    transition: opacity 0.4s ease;
}
#modal-loading.visible, #modal-result.visible {
    display: flex;
    opacity: 1;
}
.modal-loading p {
    margin-bottom: 20px;
    font-weight: bold;
}
.modal-image img {
    width: 50px;
    height: auto;
}
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 20px auto 0;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
#modal-result p {
    font-weight: bold;
    margin: 0 0 20px 0;
    font-size: 1.1em;
}
#modal-result p + p {
    margin: 20px 0 30px 0;
    font-weight: normal;
    font-size: 1em;
}
.modal-buttons button {
    padding: 12px 24px;
    font-size: 1em;
    cursor: pointer;
    border: none;
    border-radius: 6px;
}
.button-gray {
    padding: 20px;
    background: #ddd;
    color: #333;
}