/* General Styles */
body, table {
    font-family: Arial, sans-serif; /* Ensure consistent fonts */
    margin: 0;
    padding: 0;
    background-color: #f4f4f9; /* Light background for overall app */
}

/* Navbar Styles */
.navbar {

    /* background-color: #007BFF; */ /* from older definition */
    color: white;

    /* keep all the flex properties you want from both definitions */
    display: flex;
    gap: 1em;                  /* from older definition */
    justify-content: space-between; /* from newer definition */
    align-items: center;
}


.navbar a, .navbar .dropdown > a {
    color: white;
    text-decoration: none;
    padding: 0.5em 1em;
    border-radius: 4px;
    position: relative;
}

.navbar a:hover, .navbar .dropdown > a:hover {
    background-color: #0056b3;
}

/* Navbar item highlighting for current page. */
.navbar a {
    display: inline-block;      /* So ::after has a box to sit in */
    position: relative;         /* So ::after positions relative to the link */
    padding-bottom: 5px;        /* Space for the bottom bar */
    text-decoration: none;      /* We'll let the bar indicate the active link */
    color: #fff;                /* or whatever color you want for normal state */
}

/* For the active link, draw a bar at the bottom */
.navbar a.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;               /* anchored at the bottom edge of the link */
    height: 3px;             /* the thickness of the bar */
    background-color: #ff0;  /* bright color (yellow) so it’s visible */
}

/* (Optionally) give a hover style too, if you want a color change on hover */
.navbar a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* .navbar-breadcrumbs can share the same background/color as the navbar: */
.navbar-breadcrumbs {
    background-color: #007BFF;  /* Same as .navbar */
    padding: 0.5em 1em;         /* Some spacing */
    color: white;               /* White text like navbar links */
}

.navbar-breadcrumbs a {
    color: white;
    text-decoration: none;
    margin: 0 5px;
}

.navbar-breadcrumbs a:hover {
    text-decoration: underline;
}

.navbar-breadcrumbs .current {
    font-weight: bold;
    margin: 0 5px;
}


/* For screens (or windows) below 1200px wide, stack or wrap items */
@media (max-width: 800px) {
    .navbar {
        flex-direction: column;   /* stack brand, menu, user info vertically */
        align-items: flex-start;  /* left-align them */
    }

    .menu-items {
        flex-wrap: wrap;         /* let links wrap to new lines */
        margin-top: 10px;        /* spacing below the brand title */
    }

    /* Each link can have a small top/bottom margin to avoid crowding */
    .menu-items a {
        margin: 5px 0;
    }

    .user-info {
        margin-top: 10px;        
        flex-direction: row; 
        align-items: center;
        gap: 10px;               /* optional spacing between the icon and text */
    }
}



.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #333;
    min-width: 150px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1;
    border-radius: 4px;
    overflow: hidden;
}

.dropdown-content a {
    display: block;
    padding: 10px;
    text-decoration: none;
    color: white;
    background-color: #333;
}

.dropdown-content a:hover {
    background-color: #575757;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Table Styles */
table {
    width: 90%; /* Restrict width to 80% */
    margin: 20px auto; /* Center horizontally and add vertical spacing */
    border-collapse: collapse;
    background-color: white;
}


table th, table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

table th {
    background-color: #f4f4f9;
    font-weight: bold;
}

button.download-btn {
    padding: 5px 10px;
    background-color: #007BFF;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button.download-btn:hover {
    background-color: #0056b3;
}

.button {
    display: inline-block;      /* Allows padding and a “block” shape */
    padding: 6px 10px;          /* Size it like a button */
    background-color: #007BFF;  /* Button background */
    color: #fff;                /* Text color (white) */
    text-decoration: none;      /* Remove underline */
    border-radius: 4px;         /* Rounded corners (optional) */
    border: none;               /* No border or outline by default */
    cursor: pointer;            /* Show a pointer cursor on hover */

    /* Add these to unify text across <button> and <a> */
    font-size: 1rem;       /* or 16px, or whatever you prefer */
    line-height: 1.2;      /* a typical line-height */
    font-family: inherit;  /* ensures the same font family is used */
}

.button:hover {
    background-color: #0056b3;  /* Darker shade on hover */
}

.button-grey {
    display: inline-block;      /* Allows padding and a “block” shape */
    padding: 6px 10px;          /* Size it like a button */
    background-color: #ffffff;  /* Button background */
    color: #373737;                /* Text color (white) */
    text-decoration: none;      /* Remove underline */
    border-radius: 4px;         /* Rounded corners (optional) */
    border: none;               /* No border or outline by default */
    cursor: pointer;            /* Show a pointer cursor on hover */

    /* Add these to unify text across <button> and <a> */
    font-size: 1rem;       /* or 16px, or whatever you prefer */
    line-height: 1.2;      /* a typical line-height */
    font-family: inherit;  /* ensures the same font family is used */
}

.button-grey:hover {
    background-color: #e0e0e0;  /* Darker shade on hover */
}

.button-grey-small {
    background-color: #eee; /* light grey background */
    color: #333;            /* dark text color */
    border: 1px solid #888; /* subtle border */
    padding: 4px 8px;       /* small padding for a compact look */
    font-size: 13px;        /* smaller text */
    border-radius: 3px;     /* slightly rounded corners */
    text-decoration: none;  /* remove underlines on links */
    cursor: pointer;        /* show pointer on hover */
    display: inline-block;  /* allow padding/margins on link */
}

/* Optional hover/focus states for a slight effect */
.button-grey-small:hover,
.button-grey-small:focus {
    background-color: #bbb; /* slightly darker grey on hover */
    outline: none;          /* remove focus outline if desired */
}

/* Actions Section Styles */
.actions {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.actions input[type="search"] {
    padding: 10px;
    width: 300px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.actions select, .actions button {
    padding: 10px;
    margin-left: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
}

.actions button:hover {
    background-color: #0056b3;
    color: white;
}

footer {
    text-align: center;
    padding: 5px; /* Reduce padding for a smaller footer bar */
    background-color: #007BFF;
    color: white;
    position: relative;
    bottom: 0;
    width: 100%;
    font-size: 14px; /* Optional: Smaller font size for footer text */
}

/* Add spacing between the main content and the footer */
main {
    margin-bottom: 20px; /* Adds space between the main content and the footer */
}

/* Error Message */
.error-message {
    color: red;
    font-weight: bold;
    margin-bottom: 15px;
    padding: 10px;
    border: 1px solid red;
    background-color: #ffe6e6; /* Light red background */
    border-radius: 0px;
}

/* Status Message */
.status-message {
    color: green;
    font-weight: bold;
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid green;
    background-color: #e6ffe6; /* Light green background */
    border-radius: 0px;
}

/* Wait Message (yellow) */
.wait-message {
    color: #996600;
    font-weight: bold;
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid #996600;
    background-color: #fff8cc; /* Light yellow background */
    border-radius: 0px;
}

/* Navbar and Menu Items */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    white-space: nowrap;
}

/*
.navbar a {
    margin: 0 10px;
    text-decoration: none;
}
*/

/* Menu Items Container */
.menu-items {
    display: flex;
    flex-wrap: nowrap; /* Prevent wrapping */
    align-items: center;
}

/* User Info with Icon */
.user-info {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}
.user-info img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}
.user-email {
    font-size: 1rem; /* Keep the text size consistent */
    color: inherit; /* Inherit the color from the parent element */
    font-weight: normal; /* Match the weight of other menu items */
    margin-top: 5px;
    text-align: center;
}

/* Dropdown Menu */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%; /* Aligns below the user info */
    right: 0;
    background-color: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    overflow: hidden;
    z-index: 1000;
    white-space: nowrap;
}
.dropdown-menu a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: #333;
}
.dropdown-menu a:hover {
    background-color: #f0f0f0;
}

/* Show Dropdown on Hover */
.user-info:hover .dropdown-menu {
    display: block;
}

.container {
    margin-top: 20px; /* Add space on the left */
    margin-left: 20px; /* Add space on the left */
    margin-right: 20px; /* Optional: Add space on the right for symmetry */
}

.container-form {
    /* width: 80%; */
    border: 1px solid #ddd;  /* Same as users index table */
    background: #fff;        /* White background */
    padding: 20px;
    padding-top: 0px;
    margin-top: 20px; /* Add space on the left */
    margin-left: 0px; /* Add space on the left */
    margin-right: 0px; /* Optional: Add space on the right for symmetry */
    margin-bottom: 0px;     /* Space below each box */
}

/* In app.css or a similar file */
.container form > div {
    margin-bottom: 12px; /* or however much you want */
}


.user-info img {
    width: 30px; /* Set the desired width */
    height: 30px; /* Set the desired height */
    border-radius: 50%; /* Optional: Makes the icon circular */
    object-fit: cover; /* Ensures the image scales correctly without distortion */
}

.user-role {
    font-size: 0.9rem; /* Slightly smaller than the email */
    color: inherit; /* Same color as the email or menu items */
    margin-top: 0; /* Remove extra space */
    line-height: 0.0; /* Adjust line spacing to make it compact */
    text-align: center;
}

.inline-form {
    display: inline;
    margin: 0;
    padding: 0;
}

/* -- THREE-COLUMN CONTAINER -- */
.three-col-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px; 
}

/* -- THREE-COLUMN CONTAINER -- */
.three-col-container > .box-outline {
    min-width: 200px;
}

/* -- BOX OUTLINE FOR COLUMNS & OTH
/* -- BOX OUTLINE FOR COLUMNS & OTHER SECTIONS -- */
.box-outline {
    border: 1px solid #ddd;  /* Same as users index table */
    background: #fff;        /* White background */
    padding: 10px;
    margin-bottom: 20px;     /* Space below each box */
}


/* -- DEAL BUBBLES (MAIN DESCRIPTION & UPDATES) -- */
/* Container for each bubble + date line */
.bubble-container {
    display: flex;
    flex-direction: column;  /* stack bubble & date vertically */
    margin-bottom: 10px;
}
.bubble-container.left {
    align-items: flex-start; /* bubble pinned to the left */
}
.bubble-container.right {
    align-items: flex-end;   /* bubble pinned to the right */
}

.bubble {
    display: inline-block;
    max-width: 60%;          /* let bubble grow up to 60% of container width */
    padding: 10px;
    padding-right: 20px;
    padding-left: 20px;
    background-color: #ffffff !important;
    border-radius: 5px;
    margin-bottom: 1px;
    word-wrap: break-word;
    white-space: pre-wrap;   /* wrap text if it hits max-width */
}

/* Optional color or slight style difference for left vs. right */
.bubble-left  {
     /* color, border, etc. if you want a difference */ 
     min-width: 50%;
}

.bubble-right {
     /* color, border, etc. if you want a difference */ 
     min-width: 50%;
    }

/* Date/time styling (optional) */
.bubble-date-left,
.bubble-date-right {
    font-size: 0.9em;
    color: #666;
    margin-top: 0px;
    /* you can style the date text further if desired */
}

.site-title {
    /* Remove h1's default margins and optionally set a smaller size */
    margin: 0;
    font-size: 1.5rem; /* optional */
    line-height: 1.2;  /* optional */
}

.history-box {
    border: 1px solid #ccc; /* 1px border */
    padding: 10px;          /* inner padding so text isn’t against the edges */
    margin-top: 20px;       /* space from the elements above */
}
