﻿/* All your existing CSS code here */

body {
    font-family: Roboto, sans-serif;
    font-size: 16px;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: url('mm_capsule.cur'), auto;
}

.container {
    max-width: 400px; /* The container will not exceed 400px */
    width: 96%; /* Ensures responsiveness on smaller screens */
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    border-radius: 5px;
    border: 0.5px solid #196419; /* Add a 0.5px solid green border */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); /* Increase shadow size and opacity */
    /* background: url('bg.png') no-repeat center center; */ /* Add the image as a background */
    /* background-size: cover; */ /* Scales the image proportionally to fit the container */
    background-color: #FFFFF0; /* Light yellow background */
    margin: 10px auto; /* Center horizontally */
}

.container img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.container picture {
    display: block; /* Center the picture element properly */
    margin: 0 auto; /* Align the content within the container */
}

.container table {
    margin: 0 auto;
    border-collapse: collapse;
    width: 100%;
    overflow-x: auto;
    word-wrap: break-word;
}

th, td {
    border: 1px solid #ccc;
    text-align: left;
    padding: 8px;
}

thead th {
    background-color: #f2f2f2;
}

table {
    margin: 0 auto; /* Horizontally center the table inside the container */
    border-collapse: collapse;
    max-width: 98%; /* Optional: Restrict table width */
    width: auto; /* Table grows as per content, not full width */
    overflow-x: auto;
    word-wrap: break-word;
}

th, td {
    border: 1px solid #ccc;
    text-align: left; /* You can change to 'center' if required */
    padding: 8px;
    word-wrap: break-word;
    white-space: normal;
}
thead th {
    background-color: #f2f2f2; /* Optional header background color */
}

tbody tr:nth-child(odd) {
    background-color: #f9f9f9; /* Light background for odd rows */
}

tbody tr:nth-child(even) {
    background-color: #ffffff; /* White background for even rows */
}

/* Form specific styles */
form {
    margin-top: 10px;
    width: 100%; /* Ensure form takes full width of container */
}

.form-group {
    margin-bottom: 15px; /* Increased margin for better separation */
    text-align: left;
    border: 1px solid #eee; /* Added border for visual grouping */
    padding: 15px;
    border-radius: 8px;
    background-color: #fafafa;
}

label {
    display: block;
    margin: 5px 0 5px;
    font-weight: bold; /* Added for clarity */
}

input, textarea, select { /* Combined input, textarea, select for consistent styling */
    width: 100%; /* Ensure inputs take full width */
    padding: 8px; /* Increased padding */
    margin-bottom: 10px;
    box-sizing: border-box;
    font-size: 1.2rem;
    border-radius: 5px;
    border: 1px solid #ccc; /* Added border */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

textarea {
    resize: vertical; /* Allow vertical resizing */
    min-height: 80px; /* Minimum height for textareas */
}

.checkbox-group {
    display: flex;
    justify-content: space-between;
}

button {
    background-color: #4CAF50;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 10px 20px; /* Consistent padding for buttons */
    margin-top: 10px; /* Space above buttons */
}

.button-reddish {
    background-color: #d1503d;
    color: white;
    border: 1px;
    cursor: pointer;
    font-size: 1.2rem;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

button:hover {
    background-color: #45a049;
}

.link {
    text-align: center;
    margin-top: 10px;
}

.link a {
    color: #007BFF;
    text-decoration: none;
}

.link a:hover {
    text-decoration: underline;
}

.error {
    color: red;
    margin-bottom: 10px;
}

.delete-button {
    padding: 10px 15px;
    background-color: #ff0000;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Submit button */
.btn-submit {
    padding: 10px 15px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn-submit:hover {
    background-color: #0056b3;
}

/* Success and error messages */
.success-message {
    color: green;
    font-weight: bold;
}

.error-message {
    color: red;
    font-weight: bold;
}

.read-more.button {
    width: 100%;
    text-align: center;
}

a.button {
    display: inline-block;
    padding: 5px 10px;
    background-color: #fffff0;
    color: #010101;
    border-radius: 5px;
    font-size: 1.2rem;
    text-align: center;
    cursor: pointer;
    border: 1px solid #010101;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease-in-out;
    text-transform: uppercase;
    text-decoration: none;
}

button:hover,
a.button:hover {
    background-color: #2980b9;
}

footer {
    max-width: 98%;
    width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center; /* Center the content horizontally */
    justify-content: flex-start; /* Prevent vertical centering */
    padding: 2px;
    margin-top: 2rem;
    font-size: 1.2rem;
    color: #010101;
    background-color: #ecbf8a;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    box-sizing: border-box;
    border: 1px solid #FFFFFF;
    text-align: center;
}

.Q_img {
    max-width: 96%;
    height: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.language-flags {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.language-flags img {
    width: 36px;
    height: 21px;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Basic hamburger button styles */
.hamburger-menu {
    position: fixed; /* Stay in place during scroll */
    top: 10px; /* Adjust as needed */
    left: 10px; /* Adjust as needed */
    z-index: 1000; /* Ensure it's on top */
    cursor: pointer;
}

.bar {
    width: 30px;
    height: 3px;
    background-color: #333; /* Hamburger lines color */
    margin: 6px 0;
    transition: 0.4s; /* Smooth transition for animations */
}

/* Styles for when the menu is open */
.change .bar:nth-child(1) {
    -webkit-transform: rotate(-45deg) translate(-6px, 6px);
    transform: rotate(-45deg) translate(-6px, 6px);
}

.change .bar:nth-child(2) {
    opacity: 0;
}

.change .bar:nth-child(3) {
    -webkit-transform: rotate(45deg) translate(-6px, -8px);
    transform: rotate(45deg) translate(-6px, -8px);
}

/* The menu itself */
.nav-menu {
    position: fixed;
    top: 0;
    left: -250px; /* Hidden initially */
    width: 250px; /* Width of your menu */
    height: 100%;
    background-color: #f0f0f0; /* Menu background color */
    padding-top: 60px; /* Adjust if you have a fixed header */
    transition: 0.3s; /* Smooth open/close */
    z-index: 999; /* Below the hamburger button */
    overflow-y: auto; /* In case the menu is long */
}

.nav-menu.active {
    left: 0; /* Slide in when active */
}

.nav-item {
    padding: 15px;
    text-decoration: none;
    color: #333; /* Menu item text color */
    display: block;
}

.nav-item:hover {
    background-color: #ddd; /* Hover effect */
}

/* Overlay to block interaction with the rest of the page when the menu is open */
.menu-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent black */
    z-index: 998; /* Above the content, below the menu */
}

.menu-overlay.active {
    display: block;
}

/* Styles for dynamic rows (Allergies, Blood Tests) */
.dynamic-row {
    display: flex;
    flex-wrap: wrap; /* Allow items to wrap on smaller screens */
    align-items: center;
    gap: 10px; /* Spacing between fields */
    margin-bottom: 10px;
}

.dynamic-row input {
    flex: 1 1 auto; /* Allow inputs to grow and shrink, but maintain minimum size */
    min-width: 120px; /* Ensure inputs don't get too small */
    margin-bottom: 0; /* Override default input margin */
}

.dynamic-row .remove-row {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 4px;
    display: inline-block;
    white-space: nowrap; /* Prevent button text from wrapping */
    font-size: 0.9rem; /* Slightly smaller font for remove button */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Consistent shadow */
    margin-top: 0; /* Remove top margin */
}

/* Style the add buttons for dynamic sections */
#add_allergy_button,
#add_blood_test_button {
    background-color: #007BFF; /* Blue color for add buttons */
    color: white;
    padding: 8px 12px;
    border: none;
    border-radius: 5px; /* Consistent border-radius */
    cursor: pointer;
    font-size: 1rem; /* Adjusted font size */
    margin-top: 5px; /* Smaller top margin for these buttons */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Consistent shadow */
}

#add_allergy_button:hover,
#add_blood_test_button:hover {
    background-color: #0056b3;
}

/* Media queries for responsiveness */
@media (max-width: 480px) {
    body {
        font-size: 1rem;
    }

    h1 {
        font-size: 1rem;
    }

    h2 {
        font-size: 0.9rem;
    }

    .panel {
        padding: 10px;
    }

    .blog-card h2 {
        font-size: 18px;
    }

    .blog-card p {
        font-size: 0.9rem;
        margin: 5px 0;
    }

    .read-more.button {
        font-size: 0.8rem;
        padding: 8px 12px;
    }

    .container {
        width: 90%; /* Shrink width slightly more on mobile devices */
        padding: 10px; /* Save space with reduced padding */
    }

    table {
        font-size: 0.85rem;
        display: block;
        overflow-x: auto; /* Enable horizontal scrolling for tables on smaller screens */
    }

    th, td {
        font-size: 0.8rem;
        padding: 6px;
    }

    footer {
        padding: 10px;
        font-size: 0.85rem;
    }

    .link, .read-more.button {
        font-size: 0.8rem;
    }

    .dynamic-row {
        flex-direction: column; /* Stack items vertically on small screens */
        align-items: stretch; /* Stretch items to full width */
    }

    .dynamic-row input,
    .dynamic-row .remove-row {
        width: 100%; /* Full width for inputs and remove button */
        margin-bottom: 5px; /* Add some space between stacked items */
    }
}

/* For screens larger than 1200px */
@media (min-width: 1200px) {
    .container {
        max-width: 400px; /* Narrow the maximum width slightly for large screens */
        margin: 50px auto;
    }

    .container img {
        max-width: 98%; /* Cap the image width within the container limits */
        height: auto;
    }
}

list-item-with-checkbox {
    display: flex;
    align-items: center; /* Vertically align checkbox and text */
    margin-bottom: 8px; /* Space between list items */
}

.list-item-with-checkbox input[type="checkbox"] {
    margin-right: 10px; /* Space between checkbox and label */
    width: auto; /* Override default input width */
    height: auto; /* Override default input height */
    min-width: unset; /* Ensure it's not forced to a large width */
    min-height: unset; /* Ensure it's not forced to a large height */
    box-shadow: none; /* Remove box shadow for checkboxes */
    cursor: pointer;
}

.list-item-with-checkbox label {
    display: inline; /* Make label inline with checkbox */
    margin: 0; /* Remove default label margins */
    font-weight: normal; /* Reset font-weight if needed */
    cursor: pointer;
}

/* You might want to style the text when the checkbox is checked, e.g., strikethrough */
.list-item-with-checkbox input[type="checkbox"]:checked + label {
    text-decoration: line-through;
    color: #888;
}

.pin-input-container {
    display: flex;
    justify-content: center; /* Centers the group of PIN boxes */
    gap: 5px; /* Smaller gap between individual boxes */
    margin-bottom: 20px;
}

.pin-digit-input {
    width: 35px; /* Adjusted width for a single character */
    height: 45px; /* Adjusted height to make it a bit taller */
    text-align: center;
    font-size: 2rem; /* Larger font size for clear digits */
    font-weight: bold; /* Make digits bold */
    border: 1px solid #ccc;
    border-radius: 5px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
    -moz-appearance: textfield; /* Hide arrows for number input in Firefox */
    padding: 0; /* Remove padding to ensure tight fit for single character */
    line-height: 45px; /* Vertically center the single digit */
}

/* Hide arrows for number input in Chrome, Safari, Edge */
.pin-digit-input::-webkit-outer-spin-button,
.pin-digit-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Style for the continue button */
#continueButton {
    background-color: #007BFF; /* Default blue color for continue button */
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2rem;
    margin-top: 15px; /* Space above the button */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#continueButton:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

#continueButton:hover:not(:disabled) {
    background-color: #0056b3;
}

/* New style for the success state of the continue button */
#continueButton.success-button {
    background-color: #28a745; /* Green color for success */
}

#continueButton.success-button:hover {
    background-color: #218838;
}


/* General text styles for the PIN section */
.pin-heading {
    text-align: center;
    margin-bottom: 10px;
    color: #333; /* Black color */
    font-size: 1.8rem; /* Make heading more prominent */
}

.pin-message {
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
    color: red; /* To highlight error/status messages */
}

.pin-instruction {
    text-align: center;
    margin-top: 20px; /* Space below the form */
    margin-bottom: 20px;
    font-size: 1.2rem; /* Larger font size */
    color: #000; /* Black color */
    font-weight: normal; /* Override bold if it was inherited */
}

/* Remove the register-instruction-link styles as the HTML block is removed */
/* .register-instruction-link { display: none; } */

/* --- Modal Styles --- */

/* The Modal (background) */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 100; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0,0,0); /* Fallback color */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}

/* Modal Content/Box */
.modal-content {
    background-color: #fefefe;
    margin: 15% auto; /* 15% from the top and centered */
    padding: 20px;
    border: 1px solid #888;
    width: 80%; /* Could be more or less, depending on screen size */
    max-width: 400px; /* Matches your container width for consistency */
    border-radius: 5px;
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2), 0 6px 20px 0 rgba(0,0,0,0.19);
}

/* The Close Button */
.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    line-height: 20px; /* Adjust line-height to prevent it from affecting the surrounding text */
}

.close-btn:hover,
.close-btn:focus {
    color: #333; /* Darker color on hover */
    text-decoration: none;
    cursor: pointer;
}

/* Style for the info icon button */
#openModalBtn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 1em; /* Inherit font size */
    color: #007bff; /* A nice blue color for a button, matching your link style */
    display: inline; /* Keep the button next to the label */
    margin-left: 5px; /* Add a little space between the label and the button */
    
    /* Reset other button styles */
    box-shadow: none;
    margin-top: 0;
}

#openModalBtn:hover {
    color: #0056b3; /* Darker blue on hover */
}