/* General Page Styling */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f4f9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
}

/* Header Styling - Same width/shape as buttons */
.header {
    width: 90%;
    max-width: 400px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
    background-color: #333;
    color: white;
    border-radius: 12px;
    font-size: 1.5rem;
    font-weight: bold;
    box-sizing: border-box; /* Ensures padding doesn't affect width */
}

/* Geberal Styling */
.inline-block {
display: inline-block;
}
.z-10 {
z-index: 10;
}
.relative {
position: relative;
}

/* Container for the buttons */
.button-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 90%;
    max-width: 400px;
}

/* Large Button Styling */
.large-button {
    background-color: #ffffff;
    border: 2px solid #333;
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.large-button:hover {
    background-color: #333;
    color: white;
    transform: translateY(-2px);
}

.id-text {
    display: block;
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 4px;
}

.title-text {
    display: block;
    font-size: 1.2rem;
    font-weight: bold;
}

/* User Menu Button Positioning */
.user-menu {
    position: fixed;
    top: 25px;
    right: 20px;
    cursor: pointer;
    z-index: 340; /* Higher than everything else except the hamburger */
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: rgba(244, 244, 249, 0.8); /* Slight background to stay visible over text */
    padding: 5px;
    border-radius: 5px;
}

/* Side Menu Styling */
.user-menu-expanded {
    position: fixed;
    top: 60px; /* Adjusted to be just below the user menu trigger */
    right: 20px;
    /*height: 100px;*/
    height: auto;
    /* width: 280px; /* Adjust this to cover roughly 2/3 of a 400px container */
    width: 100px;
    /*max-width: 300px;*/
    background-color: #fff;
    box-shadow: 2px 0 10px rgba(0,0,0,0.2);
    z-index: 360;
    /*padding: 20px;*/
    box-sizing: border-box;
    /* NEW: Flex column setup */
    display: flex !important;
    flex-direction: column !important;   
    /* FADE LOGIC START */
    opacity: 0;
    visibility: hidden; /* Prevents clicking buttons while hidden */
    transition: opacity 0.3s ease-in-out, visibility 0.3s;
    /* FADE LOGIC END */ 
}

.user-menu-expanded.open {
    opacity: 1;
    visibility: visible;
}

/* Side Menu Styling */
.user-menu-expanded-content div {
    margin-bottom: 5px;
}

.user-menu-expanded-content-btn{
    height: 50px;
    display: block;
    width: 100%;
    /*padding: 12px;*/
    /*margin-top: 5px;*/
    background: #ffffff;
    border: none;
    /*border-radius: 8px;*/
    font-weight: bold;
    cursor: pointer;
}

.user-menu-expanded-content-btn:hover {
    background: #f0f0f0;
}

/* Hamburger Button Positioning */
.hamburger {
    position: fixed;
    top: 25px;
    left: 20px;
    cursor: pointer;
    z-index: 399; /* Higher than everything else */
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: rgba(244, 244, 249, 0.8); /* Slight background to stay visible over text */
    padding: 5px;
    border-radius: 5px;
}

.hamburger div {
    width: 30px;
    height: 4px;
    background-color: #333;
    border-radius: 2px;
}

/* Side Menu Styling */
.side-menu {
    position: fixed;
    top: 0;
    left: 0;
    /*height: 100%;*/
    height: 100vh;
    /* width: 280px; /* Adjust this to cover roughly 2/3 of a 400px container */
    width: 70%;
    max-width: 300px;
    background-color: #fff;
    box-shadow: 2px 0 10px rgba(0,0,0,0.2);
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    z-index: 360;
    padding: 20px;
    box-sizing: border-box;
    /* NEW: Flex column setup */
    display: flex !important;
    flex-direction: column !important;    
}

.side-menu.open {
    transform: translateX(0);
}

/* Menu Content */
.menu-header {
    font-size: 1.4rem;
    color: #333;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-top: 50px; /* Space for the hamburger */
}

.menu-header-container {
    display: flex;          /* Force items to sit on the same line */
    flex-direction: row;    /* Ensure they go left-to-right */
    justify-content: space-between; /* Push text to left, house to right */
    align-items: center;    /* Center them vertically relative to each other */
    margin-top: 50px; 
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    width: 100%;            /* Ensure container spans the full menu width */
}

.menu-header-text {
    font-size: 1.4rem;
    color: #333;
    margin: 0;              /* CRITICAL: Remove default bottom margin of h2 */
    flex-grow: 1;           /* Tells the text to take up the left space */
}

.menu-btn {
    display: block;
    width: 100%;
    padding: 12px;
    margin-top: 15px;
    background: #ffffff;
    border: 1.5px solid #333;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
}

.menu-btn:hover {
    background: #f0f0f0;
}

.menu-content {
    /* This stays at the top */
    flex-grow: 0;
}

.menu-footer {
    /* HIGHLIGHT: This pushes the login button to the absolute bottom */
    margin-top:  auto; 
    padding-bottom: 10px;
    border-top: 2px solid #eee;
    padding-top: 10px;
}

.footer-btn {
    margin-bottom: 5px;
}

/* Specific styling for the login button to make it stand out */
.login-btn {
    width: 100%;
    background-color: #333;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
}

.login-btn:hover {
    background-color: #555;
    color: white;
}

/* Specific styling for the account button to make it stand out */
.acct-btn {
    width: 100%;
    background-color: #333;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
}

.acct-btn:hover {
    background-color: #555;
    color: white;
}

/* Specific styling for the logout button to make it stand out */
.logout-btn {
    width: 100%;
    background-color: #333;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
}

.logout-btn:hover {
    background-color: #555;
    color: white;
}

/* Background Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    display: none;
    z-index: 350; 
}

.overlay.active {
    display: block;
}

/* NEW: Container for side-by-side layout */
.action-container {
    display: flex;       /* Enables Flexbox */
    flex-direction: row; /* Aligns items horizontally */
    gap: 15px;           /* The space between the two buttons */
    width: 90%;
    max-width: 400px;    /* Matches the header width exactly */
    box-sizing: border-box;
}

/* NEW: Small Button Styling */
.small-button {
    flex: 1;             /* Forces both buttons to take up equal width */
    background-color: #ffffff;
    border: 2px solid #333;
    border-radius: 12px;
    padding: 15px 5px;   /* Vertical padding same as large buttons */
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.small-button:hover {
    background-color: #333;
    color: white;
}

/* Form Styling */
.form-container {
    width: 90%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: white;
    padding: 25px;
    border-radius: 12px;
    border: 2px solid #333;
    box-sizing: border-box;
}

.input-group {
    display: flex;
    flex-direction: column;
    text-align: left;
    gap: 8px;
}

.input-group label {
    font-weight: bold;
    font-size: 0.9rem;
    color: #333;
}

.input-group input {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.input-group input:focus {
    border-color: #333;
    background-color: #f9f9ff;
}

/* Specifically styling the submit button at the bottom */
.action-btn {
    margin-top: 10px;
    background-color: #333 !important; /* Making the final action stand out */
    color: white !important;
    font-size: 1.2rem;
    font-weight: bold;
}

.action-btn:hover {
    background-color: #555 !important;
}

/*Home Clickable Image*/
.home-img.clickable {
    width: 24px;
    height: 24px;
    object-fit: contain;
    cursor: pointer; /* <--- HIGHLIGHT: Makes it feel like a link */
    transition: transform 0.1s ease;
    margin-left: 10px;      /* Optional: ensures a tiny gap if text is long */
}

.home-img.clickable:active {
    transform: scale(0.9); /* Gives a "button press" feel when clicked */
}

/*User Menu Clickable Image*/
.user-menu-img.clickable {
    width: 24px;
    height: 24px;
    object-fit: contain;          
    cursor: pointer; /* <--- HIGHLIGHT: Makes it feel like a link */
    transition: transform 0.1s ease;
}

/*Start of Popup Messages*/
.popup-msg {
    visibility: hidden;
    position: fixed;
    top: 50%;
    left: 50%;
    padding: 15px 20px;
    border-radius: 8px;
    background-color: #000000;
    color: white;
    z-index: 1000;
     /* Shift it back by half its own width/height to perfectly center it */
    transform: translate(-50%, -50%);
}

.popup-msg.show {
    visibility: visible;
    -webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s;
    animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

/* Animations for fading in and out */
    @-webkit-keyframes fadein { from {opacity: 0;} to {opacity: 1;} }
    @keyframes fadein { from {opacity: 0;} to {opacity: 1;} }
    @-webkit-keyframes fadeout { from {opacity: 1;} to {opacity: 0;} }
    @keyframes fadeout { from {opacity: 1;} to {opacity: 0;} }
/*End of Popup Messages*/