/* GATO GO - Main Styles */

/* Base Styles */
body {
    font-family: 'Poppins', sans-serif;
    background-color: #f5f5f5;
    min-height: 100vh;
}

/* Navigation Styles */
.navbar {
    background-color: #1e88e5;
    padding: 0.8rem 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    color: white !important;
    font-weight: 600;
    font-size: 1.4rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.navbar-brand:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    padding: 0.5rem 1rem !important;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover {
    color: white !important;
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-link i {
    font-size: 1.1rem;
}

.navbar-nav {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
}

/* Dropdown Styles */
.dropdown-menu {
    background-color: white;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 0.5rem;
}

.dropdown-item {
    padding: 0.6rem 1rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

.dropdown-item i {
    width: 1.2rem;
    text-align: center;
}

/* Badge Styles */
.badge {
    margin-left: 0.5rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Timezone Button */
.timezone-btn {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 0.4rem 0.8rem !important;
    color: rgba(255, 255, 255, 0.9) !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.timezone-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: white !important;
}

/* Settings Button */
#settings-btn {
    padding: 0.4rem !important;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
}

#settings-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: rotate(30deg);
}

#settings-btn i {
    font-size: 1.2rem;
}

/* Navbar Toggler */
.navbar-toggler {
    border: none;
    padding: 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Content Styles */
.content {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
    position: relative;
    height: calc(100vh - 200px);
    overflow-y: auto;
}

h2 {
    color: #1565c0;
    margin-bottom: 1rem;
}

/* Voyage Info Styles */
.voyage-info {
    background: linear-gradient(135deg, #1565c0, #0d47a1);
    color: white;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.voyage-info h2 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.voyage-dates {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: normal;
}

.voyage-countdown {
    font-size: 1rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.voyage-countdown i {
    font-size: 1.1rem;
}

.voyage-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.voyage-detail-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 6px;
}

.voyage-detail-item h3 {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
}

.voyage-detail-item p {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 500;
}

/* Map Styles */
#map {
    height: 400px;
    width: 100%;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.map-links {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.map-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: #1565c0;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
}

.map-link:hover {
    background-color: #0d47a1;
    color: white;
}

.map-link i {
    font-size: 1rem;
}

.vessel-time-display {
    background: #1565c0;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    position: absolute;
    top: 10px;
    right: 80px;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    min-width: 200px;
}

.vessel-time-display i {
    font-size: 1rem;
}

/* Map Animation */
.map-marker-highlight {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Photo Gallery Styles */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.5rem;
    padding: 0.5rem;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.photo-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s ease;
    height: 120px;
}

.photo-item:hover {
    transform: scale(1.05);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px;
    font-size: 0.8rem;
    text-align: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.photo-item:hover .photo-caption {
    opacity: 1;
}

/* Photo Modal Styles */
.photo-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    padding: 2rem;
    overflow-y: auto;
}

.photo-modal.active {
    display: block;
}

.modal-content {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 1rem;
    border-radius: 8px;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 1001;
}

.modal-image {
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
    margin-bottom: 1rem;
}

.modal-details {
    color: #333;
}

.modal-details h3 {
    color: #1565c0;
    margin-bottom: 1rem;
}

.modal-details p {
    margin-bottom: 0.5rem;
}

/* Modal Actions */
.modal-actions {
    display: flex;
    gap: 8px;
    margin-top: 1rem;
    align-items: center;
}

.modal-actions-left {
    display: flex;
    gap: 8px;
    flex: 1;
}

.show-on-map-btn, .download-btn, .modal-close-btn {
    min-width: 120px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    padding: 0 16px;
}

.show-on-map-btn {
    background-color: #1565c0;
    color: white;
}

.show-on-map-btn:hover {
    background-color: #0d47a1;
}

.download-btn {
    background-color: #4caf50;
    color: white;
}

.download-btn:hover {
    background-color: #388e3c;
}

.modal-close-btn {
    background-color: #dc3545;
    color: white;
    margin-top: -8px;
}

.modal-close-btn:hover {
    background-color: #c82333;
}

/* Ship's Log Styles */
.ship-log {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.log-entry {
    border-left: 4px solid #1e88e5;
    padding-left: 1rem;
    margin-bottom: 1rem;
}

.log-entry h4 {
    color: #1565c0;
    margin-bottom: 0.5rem;
}

.log-details {
    font-size: 0.9rem;
    color: #666;
}

.log-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
}

.log-table th {
    background-color: #1e88e5;
    color: white;
    padding: 12px;
    text-align: left;
}

.log-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.log-table tr:last-child td {
    border-bottom: none;
}

.log-table tr {
    cursor: pointer;
}

.log-table tr:hover {
    background-color: #f0f7ff;
}

.log-table .timestamp {
    white-space: nowrap;
    color: #666;
}

.log-table .weather {
    color: #1565c0;
}

.log-table .notes {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Camera Icon */
.camera-icon {
    color: #1565c0;
    font-size: 24px;
    text-shadow: 2px 2px 2px rgba(0,0,0,0.3);
}

/* Photo Popup */
.photo-popup {
    max-width: 300px;
}

.photo-popup img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 8px;
}

.photo-popup .caption {
    font-weight: 500;
    color: #1565c0;
    margin-bottom: 4px;
}

.photo-popup .details {
    font-size: 0.9rem;
    color: #666;
}

/* Add Button */
.add-log-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #1565c0;
    color: white;
    border: none;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    margin-left: 1rem;
}

.add-log-btn:hover {
    background-color: #0d47a1;
}

/* Right Column Layout */
.right-column {
    height: calc(100vh - 80px);
    position: sticky;
    top: 80px;
}

.right-column .content {
    height: 100%;
    margin-top: 0;
    display: flex;
    flex-direction: column;
}

.right-column h2 {
    margin-top: 0;
}

/* Track Modal */
.track-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    padding: 2rem;
    overflow-y: auto;
}

.track-modal.active {
    display: block;
}

.track-modal-content {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    position: relative;
}

.track-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: #666;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
}

.track-modal-close:hover {
    color: #333;
}

.track-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 1rem;
}

.track-table th {
    background: #1565c0;
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 500;
}

.track-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.track-table tr:last-child td {
    border-bottom: none;
}

.track-table tr:hover {
    background-color: #f8f9fa;
}

/* Log Modal */
.log-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    padding: 2rem;
    overflow-y: auto;
}

.log-modal.active {
    display: block;
}

.log-modal-content {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    position: relative;
}

.log-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: #666;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
}

.log-modal-close:hover {
    color: #333;
}

/* Timezone Modal */
.timezone-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    padding: 2rem;
}

.timezone-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.timezone-modal-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    width: 100%;
    max-width: 500px;
    position: relative;
}

.timezone-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.timezone-list {
    max-height: 400px;
    overflow-y: auto;
    margin-top: 1rem;
}

.timezone-option {
    padding: 0.75rem;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.timezone-option:hover {
    background: #f5f5f5;
}

.timezone-option.active {
    background: #e3f2fd;
    color: #1565c0;
}

.timezone-search {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 1rem;
}

/* Utility Classes */
.mt-4 {
    margin-top: 1.5rem !important;
}

.countdown, .eta, .arrived {
    color: white;
    text-align: center;
    white-space: nowrap;
}

/* Responsive Design */
@media (max-width: 768px) {
    .voyage-details {
        grid-template-columns: 1fr;
    }
    
    .map-links {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .photo-gallery {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    .vessel-time-display {
        position: relative;
        top: auto;
        right: auto;
        margin-bottom: 1rem;
        justify-content: center;
    }
    
    .d-flex.justify-content-between.align-items-center {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Voyage Track Styles */
.voyage-start-marker,
.voyage-end-marker {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.voyage-start-marker i {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

.voyage-end-marker i {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

.voyage-track-line {
    stroke-dasharray: 5, 5;
    animation: dash 20s linear infinite;
}

@keyframes dash {
    to {
        stroke-dashoffset: -10;
    }
}

.voyage-marker-popup,
.voyage-track-popup {
    font-family: 'Poppins', sans-serif;
    min-width: 200px;
}

.voyage-marker-popup h6,
.voyage-track-popup h6 {
    color: #1565c0;
    margin-bottom: 0.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.voyage-marker-popup p,
.voyage-track-popup p {
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.voyage-marker-popup strong,
.voyage-track-popup strong {
    color: #333;
    font-weight: 600;
}