/* Base Styles */
html, body {
    font-family: Arial, sans-serif;
    background-color: #ececec;
    color: #333;
    margin: 0;
    padding: 20px;
    height: 100%;
    box-sizing: border-box; /* Ensure padding is included in width and height calculations */
}

a[href^="x-apple-data-detectors"] {
    color: inherit !important;
    text-decoration: none !important;
    pointer-events: none !important;
    cursor: default !important;
}

.container {
    max-width: 800px;
    margin: auto;
    background: #f7f7f7;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

h1 {
    text-align: center;
    color: #333; /* Slightly darker for better contrast */
}

p {
    color: #333; /* Darker text color for improved contrast */
}

.bridge {
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    color: white;
}

.links {
    background-color: #5a5a5a;
    padding: 10px 15px;
    margin-bottom: 20px;
    border: 1px solid #343434;
    border-radius: 5px;
    text-align: center;
}

.available {
    background-color: #5a8f5e; /* Darker green for better contrast */
}

.warning-message {
    background-color: #d4a835; /* Darker yellow background */
    padding: 10px 15px;
    margin-bottom: 20px;
    border: 1px solid #b38e2e; /* Even darker yellow for border */
    border-radius: 5px;
    text-align: center;
}

.warning-message p {
    color: #333 !important; /* Darker gray text */
}

.raising {
    background-color: #b38353; /* Darker orange for better contrast */
}

.lowering {
    background-color: #547b8e; /* Darker blue for better contrast */
}

.unavailable {
    background-color: #995d5b; /* Darker red for better contrast */
}

.eta {
    color: #bbb; /* Darker grey for better contrast */
    font-weight: normal;
    font-size: 0.9em;
    margin-top: 10px;
}

.details {
    margin-top: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.3); /* Slightly darker for better contrast */
    border-radius: 5px;
}

.details .description {
    margin: 0;
    color: #1a1a1a; /* Darker text color for improved contrast */
}

.bottom-text {
    text-align: center;
    color: #555; /* Slightly darker for better contrast */
    font-size: 0.8em; /* Smaller font size for a discrete appearance */
    margin-top: 20px; /* Space above the text */
    padding-bottom: 10px; /* Space below the text */
}

a.language-link,
a.disclaimer-link {
    color: #0056b3; /* Darker blue for better contrast */
    text-decoration: none;
    margin-left: 5px; /* Space before the link */
    font-weight: bold; /* Ensures the link stands out */
}

a.language-link:hover,
a.disclaimer-link:hover {
    text-decoration: underline; /* Underline on hover for clarity */
}

/* Add explicit styles for Safari to ensure consistency */
a.language-link,
a.disclaimer-link {
    -webkit-text-decoration: none; /* Remove underline in Safari */
    -webkit-font-smoothing: antialiased; /* Smoother text rendering in Safari */
    text-decoration: none;
    font-smoothing: antialiased;
}

a.language-link:hover,
a.disclaimer-link:hover {
    -webkit-text-decoration: underline; /* Explicitly add underline on hover in Safari */
    text-decoration: underline;
}

.a {
    display: inline-block; /* Ensures proper spacing and alignment on Safari */
    padding: 2px 5px; /* Adds padding for easier tapping on mobile */
    transition: color 0.2s ease, text-decoration 0.2s ease; /* Smooth transition for hover effects */
}

a:visited {
    color: #004080; /* Ensure visited links have the correct color */
}

.vessel-time {
    font-weight: bold;
}

/* Media Query for Cellphones */
@media (max-width: 600px) {
    html, body {
        padding: 0px;
    }

    .container {
        padding: 15px;
        margin: 0;
        box-shadow: none; /* Remove box shadow for a simpler appearance on mobile */
    }

    .bridge {
        padding: 10px;
        margin-bottom: 15px;
    }

    .details {
        padding: 8px;
        margin-top: 5px;
    }

    .bottom-text {
        margin-top: 10px;
        padding-bottom: 5px;
        font-size: 0.7em; /* Make the footer text slightly smaller on mobile */
    }
}

/* Dark Mode Styles */
@media (prefers-color-scheme: dark) {
    html, body {
        background-color: #1d1d1d;
        color: #f0f0f0;
    }

    .container {
        background: #292929;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    }

    h1 {
        color: #fff; /* Brighter for better contrast */
    }

    p {
        color: #e0e0e0; /* Lighter text color for improved contrast */
    }

    .bridge {
        color: #e0e0e0;
    }

    .available {
        background-color: #4b704c; /* Darker green for better contrast */
    }

    .raising {
        background-color: #8e643d; /* Darker orange for better contrast */
    }

    .lowering {
        background-color: #436678; /* Darker blue for better contrast */
    }

    .unavailable {
        background-color: #7b4b4a; /* Darker red for better contrast */
    }

    .eta {
        color: #bbb;
    }

    .details {
        background: rgba(255, 255, 255, 0.15); /* Slightly darker for better contrast */
    }

    .bottom-text {
        color: #ccc; /* Lighter grey for better contrast */
    }

    .bottom-text a.language-link,
    .bottom-text a.disclaimer-link {
        color: #80bfff; /* Brighter blue for better contrast */
    }

    .bottom-text a:visited {
        color: #3399ff;
    }
}

.back-button {
    position: fixed;
    top: 20px;
    left: 20px;
    background-color: blue;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
}
.back-button:hover {
    background-color: darkblue;
}
.top-menu {
    display: flex;
    justify-content: center; /* centre le bouton */
    margin: 20px 0;
}

.menu-button {
    background-color: #3395ff;
    color: white;
    padding: 12px 25px;
    border-radius: 25px; /* rond pour un style “bouton” */
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.menu-button:visited {
    color: white;
}

.menu-button:hover {
    background-color: #0047b3;
    box-shadow: 0 6px 8px rgba(0,0,0,0.15);
}
