﻿/* General Body Style - Background is now handled by the master page */
html, body {
    min-height: 100%; /* Ensure html and body take at least full viewport height */
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Default font and color for all elements */
* {
    font-family: "Inter", sans-serif;
    color: white;
}

/* --- LIQUID GLASS STYLES FOR YOUR EXISTING ELEMENTS --- */

/* Style for Forms (Login, Register, etc.) */
form {
    position: relative;
    width: 90%;
    max-width: 450px;
    margin: 40px auto;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px; /* More rounded corners */
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    padding: 2rem 2.5rem;
}

/* Style for Workout Boxes on pages like the feed */
.workout-box {
    max-width: 600px;
    margin: 20px auto;
    padding: 24px;
    background: rgba(30, 30, 40, 0.5); /* Darker glass for contrast */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 24px;
}

    .workout-box *, .workout-box h2, .workout-box p, .workout-box .value {
        color: white; /* Ensure all text inside is white */
    }

.workout-header p {
    color: #ccc; /* Lighter color for subtext */
}

.workout-stats div:not(:last-child) {
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

/* --- UPDATED HEADER/NAV STYLES --- */

/* ASP.NET generated links in the nav */
.topNavItem a {
    text-decoration: none;
    color: white;
    font-size: 1rem;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 9999px;
    transition: all 0.3s ease;
}

    .topNavItem a:hover {
        background-color: rgba(255, 255, 255, 0.1);
        color: #e5e5e5;
    }

/* Changed selector to target the new ID for the logout link */
#logoutLink {
    background-color: rgba(255, 255, 255, 0.8);
    color: #1e3a8a; /* Dark blue */
    font-weight: 600;
}

    #logoutLink:hover {
        background-color: white;
    }

/* Profile picture adjustments */
.profile-pic-container img#profilePic {
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    width: 40px;
    height: 40px;
    transition: transform 0.3s ease;
}

    .profile-pic-container img#profilePic:hover {
        transform: scale(1.1);
    }


/* --- GENERAL FORM ELEMENT STYLING --- */

form * {
    font-family: 'Inter', sans-serif;
    color: #ffffff;
    letter-spacing: 0.5px;
    outline: none;
    border: none;
}

form h3 {
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
}

label {
    display: block;
    margin-top: 20px;
    font-size: 16px;
    font-weight: 500;
}

input, select, textarea {
    height: 50px;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    padding: 0 15px;
    margin-top: 8px;
    font-size: 14px;
    font-weight: 400;
    border: 1px solid transparent;
    transition: border-color 0.3s ease;
}

    input:focus, select:focus, textarea:focus {
        border-color: rgba(0, 220, 255, 0.5);
    }

::placeholder {
    color: #e5e5e5a0;
}

#formButton {
    margin-top: 40px;
    width: 100%;
    background: #ffffff;
    color: #080710;
    padding: 15px 0;
    font-size: 18px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

    #formButton:hover {
        background: #f0f0f0;
        transform: translateY(-2px);
    }

/* --- OTHER ELEMENTS --- */

.leaflet-control-attribution {
    display: none;
}

error {
    color: #ff8a8a;
    font-size: 1rem;
    font-weight: 500;
}

/* --- WORKOUT PAGE SPECIFIC STYLES --- */
/* These rules override the inline styles in Workout.aspx */

.container {
    background: rgba(30, 30, 40, 0.6) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
    border-radius: 24px !important;
    padding: 24px !important;
    max-width: 800px !important;
    margin: 40px auto !important; /* Added for horizontal centering */
}

    .container p, .container strong, .container h3, .container h2, .container span {
        color: white !important;
    }

#shareBtn {
    background-color: rgba(255, 255, 255, 0.2) !important;
    border: none !important;
    border-radius: 50% !important;
    width: 40px;
    height: 40px;
    padding: 8px !important;
    transition: background-color 0.3s ease;
}

    #shareBtn:hover {
        background-color: rgba(255, 255, 255, 0.3) !important;
        transform: none !important;
        box-shadow: none !important;
    }

    #shareBtn img {
        filter: brightness(0) invert(1);
    }

.lap-table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0;
    background-color: transparent !important;
    box-shadow: none !important;
    border-radius: 16px !important;
    overflow: hidden !important;
}

    .lap-table th, .lap-table td {
        color: white !important;
        border: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    }

    .lap-table th {
        background-color: rgba(255, 255, 255, 0.1) !important;
        font-size: 1rem !important;
        font-weight: 600;
    }

    .lap-table tr:nth-child(even) {
        background-color: rgba(255, 255, 255, 0.05) !important;
    }

    .lap-table tr:nth-child(odd) {
        background-color: transparent !important;
    }

    .lap-table tr:hover {
        background-color: rgba(0, 220, 255, 0.15) !important;
        transform: none !important;
        box-shadow: none !important;
    }

.workout-map, .map {
    margin-top: 16px;
    height: 400px; /* Increased height for better visibility */
    width: 100%; /* Ensure it takes full width of its container */
    background-color: rgba(0,0,0,0.2);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.bar-container, .chart-container {
    background-color: rgba(0,0,0,0.2);
    border-radius: 16px;
    padding: 1rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
    width: 100%; /* Ensure it takes full width of its container */
}

.tooltip {
    background: rgba(0, 0, 0, 0.85) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

/* For Chart.js, you must set font colors in the JavaScript options. */
/* Example for your chart options:
    scales: {
        x: { ticks: { color: 'white' }, grid: { color: 'rgba(255,255,255,0.1)' } },
        y: { ticks: { color: 'white' }, grid: { color: 'rgba(255,255,255,0.1)' } }
    },
    plugins: {
        legend: { labels: { color: 'white' } }
    }
*/

/* Adjusted glass-panel background for better readability with blur */
.glass-panel {
    background: rgba(255, 255, 255, 0.25); /* Increased opacity for better text contrast */
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}
.spinner {
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}