/* Define Colour Scheme */
:root {
    --light-blue: #95bfff;
    --mid-blue: #4173c1;
    --dark-blue: #2B2D42;
    --light-purple: #c4bbfc;
    --mid-purple: #6e62b6;
    --dark-purple: #351192;
    --light-green: #82DDDD;
    --mid-green: #30B1B1;
    --dark-green: #018080;
    --dark-grey: #333;
    --background-grey: #F8F7F9;
    --shadow: rgba(0, 0, 0, 0.1);
    --border: #ccc;
}

/* Global Styles */
body {
    background-color: var(--background-grey);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 80vh;
    margin: 0;
    font-family: sans-serif;
    font-size: 12px;
    line-height: 1.5;
    color: var(--dark-grey);
    padding-top: 70px;
}

body.login {
    align-items: center;
}

/* Container Styles */
.container, .login-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px var(--shadow);
    padding: 20px;
    width: 90%;
    margin: 20px auto;
}

.has-minimum {
    min-width: 540px;
}

.login-container {
    width: 300px;
    padding: 30px;
}

.login-container h2 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--dark-grey);
}

.login-container .logo {
    width: 250px;
    margin: 0 auto 20px;
}

.login-container .logo img {
    max-width: 100%;
    height: auto;
}

/* Form Styles */
.loginForm div {
    margin-bottom: 15px;
}

.loginForm label {
    display: block;
    margin-bottom: 5px;
    color: var(--dark-grey);
}

.loginForm input, .loginForm button {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    box-sizing: border-box;
}

.loginForm button {
    background-color: var(--mid-purple);
    color: var(--background-grey);
    border: none;
    cursor: pointer;
}

.loginForm button:hover {
    background-color: var(--dark-blue);
    color: var(--background-grey);
}

/* Options and Buttons */
.options {
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    gap: 10px;
}

.option, .option-link {
    padding: 10px 15px;
    color: var(--dark-grey);
    border: 1px solid var(--mid-purple);
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
    font-size: 14px;
}

.option:hover, .option-link:hover {
    background-color: var(--dark-blue);
    box-shadow: 4px 4px 8px var(--shadow);
    color: var(--background-grey);
}

.option-link {
    display: block;
    width: 15%;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .option, .option-link {
        flex: 1 0 90%;
        margin-bottom: 10px;
    }
}

/* Container Styles */
#procedure-container, .section-header, .section-content, .dual-content {
    border: 1px solid var(--border);
    padding: 10px;
    margin: 5px;
}

/* Print Styles */
.narrow {
    padding: 2px 10px;
}

.dual-wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Allows containers to wrap onto the next line */
    gap: 4px;
    margin: 5px;
}

.dual-container {
    display: flex;
    flex-direction: column;
    box-sizing: border-box; /* Ensures padding and border are included in width */
    width: auto; /* Or width: auto; */
}

/* Dual headers Styles */
.dual-container .section-header, .dual-content {
    flex: 1;
    margin: 0px;
}

.six-field {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(6, 1fr);
    margin-top: 5px;
    gap: 2px;
}

.seven-field {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-top: 5px;
    gap: 2px;
}

.seven-field input, .six-field input {
    width: 100%;
}

.three-field {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin-top: 5px;
    gap: 2px;
}

/* Target every second .section-header within .dual-container */
.dual-container:nth-child(even) .section-header {
    background-color: var(--light-purple); /* Example: Light gray */
    max-height: 21px;
}

/* Target every odd .section-header within .dual-container */
.dual-container:nth-child(odd) .section-header {
    background-color: var(--light-blue); /* Example: Slightly lighter gray */
    max-height: 21px;
}

/* Span multiple columns */
.span-2 { 
    grid-column: span 2;  /* Spans two columns */
}
.span-5 { 
    grid-column: span 5;  /* Spans two columns */
}

/* Media Query for smaller screens */
@media (max-width: 1000px) { /* Adjust 768px to your desired breakpoint */
    .dual-wrapper {
        display: grid;
        grid-template-columns: repeat(1, 1fr);
    }

    .dual-container {
        display: flex;
        flex-direction: column;
        box-sizing: border-box; /* Ensures padding and border are included in width */
        width: auto; /* Or width: auto; */
    }
}

/* Styles for top half of form */
.section-header {
    background-color: var(--light-blue);
}

.section-header:nth-child(4n+1) {
    background-color: var(--light-purple);
}

.section-title {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 0;
}

.section-content, .section-inline {
    display: flex; /* Use flexbox for content */
    flex-wrap: wrap; /* Allow wrapping */
    align-items: flex-start; /* Align items to the top */
}

.label, .full-width label {
    font-weight: bold;
    display: inline-block;
    width: 60%;
    margin-right: 5px;
}

.largeLabel {
    font-weight: bold;
    display: inline-block;
    width: 100%;
    margin-right: 5px;
}

.inline-field {
    display: flex;
    align-items: center;
    flex: 1 0 33.33%;
    padding: 5px;
    box-sizing: border-box;
}

.single-field {
    display: block;
    max-width: 20%;
    min-width: 20%;
    padding: 5px;
    box-sizing: border-box;
}

/*
.single-field button {
    padding: 5px;
    width: fit-content;
    margin: 10px 5px;
}
*/

#patientForm select, #searchForm select, #userForm select, form input  /* [type="text"] */ {
    width: 100%;
    padding: 2px;
    box-sizing: border-box;
}
#patientForm select, #searchForm select, #userForm select {
    padding: 3px;
}

/* Procedure Styles */
.procedure-container {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
}

.grid-item {
    padding: 3px;
}

.grid-header {
    background-color: var(--background-grey);
    color: #000;
    font-weight: bold;
    text-align: left;
}

.double-column {
    grid-column: span 2;
    margin-top: 5px;
    margin-left: 3px;
}

.double-column button {
    padding: 7px;
}

.full-width {
    /* Current setup - remove top two lines for simpler display */
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    flex: 1 0 95%; /* Takes full width of the section */
    padding: 5px;
}

.full-width-six {
    /* Current setup - remove top two lines for simpler display */
    display: flex;
    /* grid-template-columns: repeat(6, 1fr); */
    flex: 1 0 95%; /* Takes full width of the section */
    padding: 5px;
}

.full-width-grid-error {
    grid-column: 1 / 8; /* Value spans 5 columns */
}

.full-width label {
    grid-column: 1 / 2; /* Value spans 1 columns */
}

.full-width input {
    grid-column: 2 / 8; /* Value spans 5 columns */
}

a.nav-button {
    margin-top: 0;
    padding: 8px 25px;
    background-color: var(--background-grey);
    color: var(--mid-purple);
    border: 1px solid var(--dark-grey);
    border-radius: 4px;
    cursor: pointer;
    margin-right: 5px;
    text-decoration: none;
}

.submit-button {
    margin-top: 0;
    padding: 10px 20px;
    background-color: var(--mid-purple);
    color: var(--background-grey);
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.submit-button:hover, .nav-button:hover {
    background-color: var(--dark-blue);
    color: var(--background-grey);
}

/* Error Styles */
.error {
    border-color: #4d0303;
}

.login .error, .container .error {
    color: #4d0303;
    margin-top: 20px;
    padding: 10px;
    text-align: left;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
}

/* Banner Styles */
.banner {
    background-color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px var(--shadow);
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}

.banner-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 90%;
    margin: 0 auto;
    padding: 0 10px;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo-container .logo img {
    height: 50px;
    margin-right: 10px;
}

.company-name {
    color: var(--dark-grey);
    font-size: 1.6em;
}

/* Navigation Menu Styles */
.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav ul li {
    display: inline-block;
    font-size: 14px;
    min-width: 90px;
    text-align: center;
}

.main-nav ul li a {
    color: var(--dark-grey);
    text-decoration: none;
    padding: 10px 15px;
    display: block;
    transition: background-color 0.3s, color 0.3s;
    border-radius: 4px;
}

.main-nav ul li a:hover {
    color: var(--background-grey);
    background-color: var(--dark-blue);
}

/* Dropdown Menu Styles */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    transform: translateY(-10px);
    pointer-events: none;
    min-width: 100%;
    box-sizing: border-box;
    border-radius: 4px;
}

.dropdown-menu li a {
    white-space: nowrap;
    box-sizing: border-box;
}

.dropdown-menu li a:hover {
    background-color: var(--shadow);
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
    transition-delay: 0s;
}

/* PDF Styles */
@page { size: A4 portrait; margin: 0.5cm; }
table {
    width: 100%;
}
td {
    width: 8%; 
    padding-right: 10px;
}
td.data {
    width: 18%;
}
td input {
    width:100%;
}
#pdfContainer {
    position: absolute;
    top: 0px;
    width: 100%;
    font-size: 11px;
}
#pdfContainer .section-title {
    font-size: 12px;
}