/* ========== Body and Background ========== */
body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background: #f4f4f9; /* Ensuring body background is consistently applied */
}

.bg-page {
    background-color: #f4f4f9 !important;
}

/* ========== Navbar Styles ========== */
.custom-navbar {
    background-color: #007bff; /* Blue background for navbar */
}

/* Ensure all nav-link items have the same vertical alignment */
.navbar-nav .nav-link,
.navbar-nav .nav-item > span.nav-link {
    display: flex;
    align-items: center;
    height: 100%;
}

/* Style the Logout button to resemble nav-links */
.navbar-nav .nav-item .logout-button {
    border: none;
    background: none;
    padding: 0;
    margin: 0;
    font: inherit;
    cursor: pointer;
    text-decoration: none;
}

/* Remove focus outline for Logout button */
.navbar-nav .nav-item .logout-button:focus {
    outline: none;
    box-shadow: none;
}

/* Hover effect to match nav-links */
.navbar-nav .nav-item .logout-button:hover {
    text-decoration: underline;
}

/* 
   Make all nav items white text on the blue background.
   Use !important to override any inline or conflicting styles.
*/
.custom-navbar .navbar-nav .nav-link,
.custom-navbar .navbar-nav .logout-button {
    color: #fff !important;
}
.custom-navbar .navbar-nav .nav-link:hover,
.custom-navbar .navbar-nav .logout-button:hover {
    color: #e2e6ea !important; /* Light gray on hover */
}

/*
 If you want the navbar toggler icon (hamburger) to be white:
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg'
    fill='%23fff' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba(255, 255, 255, 0.7)'
    stroke-linecap='round' stroke-miterlimit='10' stroke-width='2'
    d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}
*/

/* ========== Form Styles ========== */
.form-group.row {
    display: flex;
    align-items: center;
    margin-bottom: 20px; /* Uniform margin for better spacing */
}

.col-form-label {
    flex: 0 0 15%; /* Consistent width for all labels */
    text-align: right;
    padding-right: 15px;
}

/* ========== Upload Container Styles ========== */
.upload-container {
    background-color: #fff; /* White background for container */
    border-radius: 8px;     /* Rounded corners */
    padding: 30px;
    margin-top: 20px;
    margin-bottom: 20px;
}

/* Button hover effect */
.btn:hover {
    background-color: #0056b3; /* Darker blue on hover for buttons */
}

/* ========== Responsive Styles ========== */
@media (max-width: 576px) {
    .col-form-label,
    .form-control {
        flex: 1 0 100%;
        text-align: left;
    }
    .col-form-label {
        padding-right: 0;
        margin-bottom: 0.5rem;
    }
}

/* ========== Results Container Styles ========== */
#results-container .table-responsive {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#results-container .btn-primary,
#results-container .btn-secondary {
    width: auto; /* Override any full-width styles applied globally */
    margin: 5px;
}

/* ========== Edit Link Styles ========== */
#edit-all {
    color: #007bff; /* Default link color */
    text-decoration: none;
}
#edit-all:hover {
    color: #0056b3; /* Darker on hover */
    text-decoration: underline;
}

/* ========== Streak Circle CSS ========== */
/* Base circle styling (gray background, zero fill by default) */
.streak-circle {
    display: inline-block;
    width: 1em;
    height: 1em;
    border-radius: 50%;
    background-color: #ddd; /* Gray unfilled portion */
    position: relative;
    vertical-align: middle;
    margin-left: 0.75rem; /* Some spacing from preceding text */
}

/* The fill portion (initially 0%) */
.streak-circle::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: 50%;
    background-color: #28a745; /* Green fill */
    width: 0%; /* no fill by default */
}

/* 1/3 fill */
.streak-circle.partial-1::after {
    width: 33%;
}

/* 2/3 fill */
.streak-circle.partial-2::after {
    width: 66%;
}

/* Full fill (3/3 or more) */
.streak-circle.full::after {
    width: 100%;
}

.card-top-offset {
    margin-top: -30px; /* Adjust this value to move the card higher or lower */
}

/* Mobile navbar rhythm and touch targets (for navbar-expand-lg) */
@media (max-width: 991.98px) {
    .navbar-collapse .nav-link {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }

    .navbar-collapse .nav-item + .nav-item {
        margin-top: 0.125rem;
    }

    .navbar-collapse .lang-block {
        border-top: 1px solid var(--bs-border-color-translucent, rgba(0, 0, 0, 0.125));
    }
}
