:root {
    /* Primary Colors */
    --primary-color: #ed7203;
    --secondary-color: #f5ac6c;
    /* Background Colors */
    --background-color: white;


    --background-container: white;


    --background-white: #ffffff;
    --background-f0f0f0: #f0f0f0;
    --background-f2f2f2: #f2f2f2;
    --background-blue: #3498db;

    /* Text Colors */
    --text-color-black: #000000;
    --text-color-dark: #333333;
    --text-color-medium: #666666;
    --text-color-grey: #808080;
    --text-color-white: #ffffff;

    /* Border Colors */
    --border-color-light: #ddd;
    --border-color-ced4da: #ced4da;
    --border-color-dfdddd: #dfdddd;
    --border-color-gray: #bcbcbc;
    --border-color-darker-gray: #9b9999;
    --border-color-ccc: #ccc;
    --border-color-transparent: transparent;

    /* Shadow Colors */
    --shadow-color-light: rgba(0, 0, 0, 0.1);
    --shadow-color-medium: rgba(0, 0, 0, 0.2);
    --shadow-color-dark: rgba(0, 0, 0, 0.3);

    /* Hover Colors */
    --hover-background-light: #bcbcbc;


    /* Other */
    --cookie-overlay-background: rgba(128, 128, 128, 0.5);
}

/* General Reset (Optional, but recommended) */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-box-sizing: border-box; /* Safari/Chrome */
    -moz-box-sizing: border-box; /* Firefox */
}

body {
    align-items: center;
    background-color: var(--background-color);
    display: -webkit-flex; /* Safari/Chrome */
    display: -moz-flex; /* Firefox */
    display: flex;
    font-family: Helvetica, sans-serif;
    justify-content: center;
    margin: 0;
    min-height: 100vh;
    font-style: normal;
    font-size: 16px; /* Base font size for better readability on all devices */
}

.container {
    background-color: var(--background-white);
    border-radius: 5px;
    -webkit-box-shadow: 0px 0px 10px var(--shadow-color-light); /* Safari/Chrome */
    -moz-box-shadow: 0px 0px 10px var(--shadow-color-light); /* Firefox */
    box-shadow: 0px 0px 10px var(--shadow-color-light);
    max-width: 600px;
    width: 95%; /* Use percentage for better responsiveness */
    padding: 20px;
    margin: auto;
    display: block;
    margin-top: 20px;
}

h1, h2, h3, h4 {
    color: var(--text-color-dark);
}

h1 {
    font-size: 1.5em; /* Relative font size for better scaling */
}

h2 {
    font-size: 1.4em; /* Slightly reduced for better mobile display */
    text-align: center;
}

h3 {
    font-size: 1.3em; /* Slightly reduced for better mobile display */
}

h4 {
    font-size: 1.1em; /* Changed to relative unit for better scaling */
}

@media (min-width: 700px) {
    h3 {
        font-size: 1.15em;
    }
}

@media (max-width: 700px) {
    h3 {
        font-size: 1em;
    }
}

form {
    background-color: var(--background-color);
    border-radius: 20px;
    margin: 10px auto; /* Center align forms */
    padding: 10px;
    width: 95%; /* Increased width to use more screen space on mobile */
}

.section {
    background-color: var(--background-white);
    border-radius: 20px;
    box-shadow: 0px 0px 15px var(--shadow-color-light);
    margin: 30px auto; /* Reduced margin for tighter layout on small screens */
    max-width: 600px;
    width: 95%; /* Use percentage for better responsiveness */
    padding: 15px; /* Slightly reduced padding for mobile */
    position: relative;
}

.section h2 {
    margin-top: 0;
    margin-bottom: 20px;
}

label {
    display: block;
    font-weight: bold;
    margin-bottom: 10px; /* Adjust as needed */
    font-size: 14px;
    border-radius: 20px;
    color: var(--text-color-dark);
}

.question {
    margin-top: 20px;
}

input[type="text"], 
input[type="number"], 
input[type="password"], 
select, 
textarea {
    border-radius: 20px;
    box-sizing: border-box;
    margin-bottom: 20px;
    padding: 8px;
    width: 100%;
    font-size: 12px;
    height: 30px; /* Set a fixed height */
    border: 1px solid var(--border-color-light);
}

.btn-group {
    display: inline-block;
    justify-content: center;
    align-items: center;
    margin: 10px 0;
    font-size: 12px;
    border-radius: 15px;
    box-shadow: 0 4px 8px var(--shadow-color-light); /* Subtle shadow for depth */
}

.buttonPath {
    margin-top: 20px;
}

/* Base styles for all buttons */
#submitPrompt,
#submitMatchmaking,
.choicePathButton,
#submitClinicofchoice,
.submitTextButton,
.selectDepartmentButton,
.matchmakingPathButton {
    background-color: var(--secondary-color); /* Soft orange background */
    color: var(--text-color-white); /* White text for contrast */
    padding: 8px 0px; /* Increased padding for better touch targets */
    font-size: 16px; /* Larger font size for better readability on mobile */
    border: 2px solid var(--border-color-transparent); /* Transparent border for a clean look */
    border-radius: 20px; /* Rounded corners for a friendly appearance */
    cursor: pointer; /* Hand cursor on hover for interactivity */
    transition: all 0.3s ease; /* Smooth transition for all properties */
    box-shadow: 0 4px 8px var(--shadow-color-medium); /* Subtle shadow for depth */
    margin: 10px 0; /* Space between buttons */
    display: inline-block; /* Allows buttons to sit side by side */
    text-align: center; /* Center the text inside the button */
    width: 100%; /* Full width buttons on mobile for easier tapping */
    max-width: 100%; /* Maximum width to prevent overly wide buttons on larger screens */
}

/* Hover state for buttons */
#submitPrompt:hover,
#submitMatchmaking:hover,
.choicePathButton:hover,
#submitClinicofchoice:hover,
.selectDepartmentButton:hover,
.matchmakingPathButton:hover,
.selectClinicButton:hover,
.submitTextButton:hover {
    background-color: var(--primary-color); /* Darker orange for hover state */
    color: var(--text-color-white); /* Keep text white for contrast */
    box-shadow: 0 6px 12px var(--shadow-color-dark); /* Slightly deeper shadow on hover */
}

.activeButton {
    background-color: var(--primary-color); /* Darker orange for active state */
    color: var(--text-color-white); /* Maintain white text */
    box-shadow: 0 6px 12px var(--shadow-color-dark); /* Deeper shadow */
    /* All other styles remain the same as the base button styles */
}

.selectClinicButton {
    background-color: white;
}

#matchmakingForm,
#promptForm,
#pathForm,
#generatedTextForm,
#clinicchoiceForm,
#departmentForm {
    background-color: white;
}

#matchMaking

/* Focus state for buttons to improve accessibility */
#submitPrompt:focus,
#submitMatchmaking:focus,
.choicePathButton:focus,
.selectDepartmentButton:focus,
.matchmakingPathButton:focus,
.submitTextButton:focus,
.submitClinicofchoice:focus {
    outline: none; /* Remove default focus outline */
    box-shadow: 0 0 0 3px rgba(255, 165, 0, 0.5); /* Custom focus style with an outer glow */
}

/* Active state for buttons to show they are being pressed */
#submitPrompt:active,
#submitMatchmaking:active,
.choicePathButton:active,
.selectDepartmentButton:active,
.matchmakingPathButton:active,
.submitClinicofchoice:active,
.submitTextButton:active {
    background-color: var(--primary-color); /* Darker orange for active state */
    transform: translateY(2px); /* Push the button down a bit */
    box-shadow: 0 2px 4px var(--shadow-color-medium); /* 'Pressed' effect shadow */
}

.selectDepartmentButton.active {
    background-color: var(--primary-color); /* Active color */
    color: var(--text-color-white); /* Active text color */
    /* Add other styles for active state if necessary */
}

.departmentRadio {
    display: none; /* Hide the actual radio button */
}

.selectDepartmentButton {
    /* Your existing button styles */
    display: inline-block; /* Example display property */
    cursor: pointer;
    /* Add other button-like styling */
}

.departmentRadio:checked + .selectDepartmentButton {
    background-color: var(--primary-color); /* Active color */
    color: var(--text-color-white); /* Active text color */
    /* Add other styles for active state */
}

.clinic {
    background-color: var(--background-white);
    border: 20px solid var(--border-color-gray);
    border-radius: 20px;
    box-shadow: 0 2px 4px var(--shadow-color-light);
    margin-bottom: 15px;
    padding: 20px;
    width: 80%;
}

.pflicht {
    color: var(--text-color-grey);
    font-size: 11px;
}

.clinic h2 {
    color: var(--text-color-dark);
    font-size: 1.5em;
    margin-bottom: 10px;
}

.clinic p {
    color: var(--text-color-medium);
    font-size: 1em;
    line-height: 1.6;
}

.generatedText {
    text-align: justify;
}

.selectClinicButton {
    width: 100%;
    margin: 10px 0;
    padding: 17px;
    border: 1px solid var(--border-color-light);
    border-radius: 20px;
    background-color: var(--background-color);
    text-align: left;
}

.selectClinicButton:hover {
    background-color: var(--primary-color);
    color: var(--text-color-black);
    cursor: pointer;
    transition: background-color 0.5s, color 0.5s;
}

.selectClinicButton:active {
    background-color: var(--primary-color);
    color: var(--text-color-black);
}

/* Department Styles */
.department {
    background-color: var(--background-f2f2f2);
    border-radius: 0.5rem;
    box-shadow: 0 0.25rem 0.5rem var(--shadow-color-light);
    margin-bottom: 2rem;
    opacity: 0;
    padding: 1rem;
    transform: translateY(1rem);
    transition: opacity 0.5s ease, transform 0.5s ease;
    width: calc(33.33% - 1rem);
}

.department:hover {
    box-shadow: 0 0.5rem 1rem var(--shadow-color-medium);
    transform: translateY(0);
}

.department h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.department p {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

/* Responsive Design */
@media screen and (max-width: 600px) {
    .form-input,
    #submitMatchmaking {
        margin-top: 0;
        width: 100%;
    }
    
    body {
        font-size: 16px; /* Ensure good base font size for mobile */
    }
    
    input[type="text"], 
    input[type="number"], 
    input[type="password"], 
    select, 
    textarea {
        font-size: 16px; /* Prevent zoom on focus in iOS */
        height: 40px; /* Taller input fields for better touch interaction */
        margin-bottom: 15px;
    }
    
    /* Improve button usability on mobile */
    button, 
    .btn, 
    .btn-primary,
    .btn-secondary,
    .btn-outline-primary {
        width: auto;
        margin: 8px 0;
        padding: 12px 15px; /* Larger touch targets */
    }
    
    /* Make radio buttons and checkboxes more touchable */
    .form-input[type="radio"] + label {
        padding: 8px 12px;
        margin: 4px;
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .clinic {
        width: 95%;
    }

    h2 {
        font-size: 1.3em;
    }
    
    /* Improve spacing for easier reading */
    p, li {
        font-size: 15px;
        line-height: 1.5;
    }
    
    /* Make custom radio buttons more touchable */
    .radio-button-container label {
        padding: 10px 15px;
        margin: 5px 2px;
    }
}

@media (max-width: 768px) {
    .section,
    .container,
    .clinic {
        width: 95%; /* Almost full width with a small margin */
        padding: 15px; /* Reduced padding */
        margin: 20px auto;
    }

    h2 {
        font-size: 1.2em; /* Smaller heading size */
    }

    /* Adjust form elements for better usability on small screens */
    input[type="text"],
    input[type="number"],
    select,
    textarea {
        padding: 12px; /* Larger padding for easier interaction */
        border-radius: 20px; /* Slightly less rounded for more space */
    }

    .info-box {
        width: 95%; /* Wider info box */
        padding: 12px;
    }
    
    /* Ensure proper spacing between elements */
    .question {
        margin-top: 15px;
        margin-bottom: 15px;
    }
    
    /* Improve readability of labels */
    label {
        margin-bottom: 8px;
        font-size: 15px;
    }
}

@media (max-width: 576px) {
    h1 {
        font-size: 1.4em;
    }
    
    h2 {
        font-size: 1.2em;
    }
    
    h3 {
        font-size: 1.1em;
    }
    
    h4 {
        font-size: 1em;
    }

    /* Smaller text for very small screens but still readable */
    label {
        font-size: 14px;
    }
    
    /* Full width elements for maximum space usage */
    .section,
    .container,
    .clinic,
    .info-box,
    form {
        width: 100%;
        border-radius: 15px; /* Slightly less rounded for more content space */
        padding: 12px;
        margin: 15px auto;
    }
    
    /* More condensed button styling for small screens */
    #submitPrompt,
    #submitMatchmaking,
    .choicePathButton,
    #submitClinicofchoice,
    .submitTextButton,
    .selectDepartmentButton,
    .matchmakingPathButton,
    #weiterLink {
        padding: 10px 15px;
        font-size: 15px;
        width: 100%;
        max-width:100%
    }
}

/* Additional media query for very small smartphones */
@media (max-width: 375px) {
    body {
        font-size: 15px;
    }
    
    .section, 
    .container {
        padding: 10px;
    }
    
    h1, h2, h3, h4 {
        margin-bottom: 10px;
    }
    
    input[type="text"],
    input[type="number"],
    select,
    textarea {
        height: 38px;
        padding: 8px 10px;
        font-size: 15px;
    }
    
    /* Minimize margins and padding to maximize usable space */
    .question,
    .btn-group,
    .buttonPath {
        margin: 8px 0;
    }
}

/* Hide the default radio button */
.form-input[type="radio"] {
    display: none;
}

/* Custom style for the radio button */
.form-input[type="radio"] + label {
    /* Basic styling */
    display: inline-block;
    padding: 5px 10px;
    margin: 5px;
    border: 2px solid var(--border-color-grey);
    border-radius: 5px;
}

/* Style when radio button is checked */
.form-input[type="radio"]:checked + label {
    border-color: var(--primary-color);
}

/* Miscellaneous Styles */
.info-container {
    display: inline-block;
    position: relative;
}

.info-box {
    background-color: var(--background-color);
    border: 1px solid var(--border-color-light);
    display: none;
    padding: 10px;
    position: absolute;
    width: 200px;
    z-index: 1;
}

.info-button:hover + .info-box,
.info-button:focus + .info-box {
    display: block;
}

.loading-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%; /* Initial width */
    height: 3px; /* Adjust the height as needed */
    background-color: var(--primary-color);
}

.form-group {
    position: relative;
    margin-bottom: 1rem;
}

.form-control {
    display: block;
    width: 100%;
    padding: .375rem .75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-color-medium);
    background-color: var(--background-white);
    background-clip: padding-box;
    border: 1px solid var(--border-color-ced4da);
    border-radius: .25rem;
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

#resultsDropdownClinic,
#resultsDropdownPrimary,
#resultsDropdownSecondary {
    position: absolute;
    top: 100%; /* Position directly below the input field */
    left: 0;
    width: 100%; /* Align width with the input field */
    max-height: 200px;
    overflow-y: auto;
    background-color: var(--background-white);
    border: 1px solid var(--border-color-dfdddd);
    border-radius: 5px;
    z-index: 1000;
    display: none; /* Initially hidden */
}

#resultsDropdownClinic:hover,
#resultsDropdownPrimary:hover,
#resultsDropdownSecondary:hover {
    background-color: var(--hover-background-light);
    border-color: var(--border-color-darker-gray);
}

.dropdown-item {
    padding: 8px 12px;
    color: var(--text-color-dark);
    text-decoration: none;
    display: block;
}

.dropdown-item:hover {
    background-color: var(--background-f0f0f0);
    border-radius: 20px;
}

footer {
    position: fixed;
    left: 50%;
    bottom: 10px;
    transform: translateX(-50%);
    width: 600px;
    height: 30px; /* Höhe des Footers */
    background-color: var(--primary-color);
    color: var(--text-color-white);
    text-align: center;
    border-radius: 20px;
    box-shadow: 0px -2px 5px var(--shadow-color-medium);
    display: flex;
    align-items: center; /* Zentriert den Inhalt vertikal */
    justify-content: center; /* Zentriert den Inhalt horizontal */
    font-size: 12px;
}

footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex; /* Ermöglicht eine flexible Anordnung der Listenelemente */
    align-items: center;
}

footer ul li {
    display: inline;
    margin: 0 10px;
}

footer a {
    color: var(--text-color-white);
    text-decoration: none;
}

.textN {
    text-align: justify;
}

.header {
    position: fixed;
    left: 50%;
    top: 10px;
    transform: translateX(-50%);
    width: 600px;
    height: 30px; /* Höhe des Footers */
    background-color: var(--primary-color);
    color: var(--text-color-white);
    text-align: center;
    border-radius: 20px;
    box-shadow: 0px -2px 5px var(--shadow-color-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    z-index: 1000; /* High value to ensure it's on top */
}

.top-bar {
    width:100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.top-bar-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 60%; /* Adjust as needed */
    max-width:80%;
}

.top-bar a, .top-bar span {
    color: var(--text-color-white); /* Or any other color */
    text-decoration: none;
    margin: 0 10px; /* Adjust spacing as needed */
    display: flex;
    align-items: center;
}

.top-bar i.fa {
    margin-right: 5px; /* Spacing between icon and text */
}

/* Style for label when its radio button is checked */
/* Add this style for shadow effect when the radio button is focused */
.btn-check:focus + label {
    box-shadow: 0 4px 8px var(--shadow-color-medium); /* Subtle shadow for depth */
}

/* Other styles remain the same */
.btn-group {
    display: inline-flex;
    align-items: center;
    box-shadow: 0 4px 8px var(--shadow-color-light); /* Subtle shadow for depth */
}

.btn-check {
    position: absolute;
    clip: rect(0,0,0,0);
    pointer-events: none;
    box-shadow: 0 4px 8px var(--shadow-color-light); /* Subtle shadow for depth */
}

.btn-outline-primary {
    padding: 0.375rem 0.75rem;
    background-color: var(--secondary-color);
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
    box-shadow: 0 4px 8px var(--shadow-color-light); /* Subtle shadow for depth */
    font-size: 11px; /* Example font size, adjust as needed */
    display: inline-block;
    color: white;
    font-weight: 400;
    line-height: 1.5;
}

.btn-outline-primary:hover {
    color: var(--text-color-white);
    background-color: var(--primary-color);
    box-shadow: 0 4px 8px var(--shadow-color-light); /* Subtle shadow for depth */
    cursor: pointer;
}

.btn-outline-primary:focus,
.btn-check:checked + label {
    color: var(--text-color-white);
    background-color: var(--primary-color);
}

#loadingContainer {
    text-align: center; /* Center the content */
    padding: 10px; /* Add some padding */
    background-color: var(--background-white); /* Light background color */
    border: 1px solid var(--background-white); /* Border for visibility */
    margin-top: 5px; /* Spacing above the container */
    font-size: 12px;
}

#loadingBar {
    width: 40px;
    height: 40px;
    border: 5px solid #f3f3f3; /* Light grey */
    border-top: 5px solid var(--background-blue); /* Blue */
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: auto; /* Center horizontally */
    position: relative;
    top: 50%;
    transform: translateY(-50%); /* Center vertically */
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.cookie-consent-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--cookie-overlay-background); /* Grau transparenter Hintergrund */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.cookie-consent-box {
    background: var(--background-white);
    padding: 20px;
    width: 30%;
    min-width: 300px;
    border-radius: 15px;
}

.cookie-consent-content h2 {
    color: var(--text-color-black);
    margin-bottom: 10px;
}

.cookie-consent-content p {
    color: var(--text-color-medium);
    font-size: 14px;
    margin-bottom: 20px;
}

.cookie-buttons a {
    color: var(--text-color-black);
    text-decoration: none;
    margin-right: 10px;
    font-size: 12px;
    display: inline-block; /* Änderung für nebeneinander Anzeige */
}

.cookie-accept {
    color: var(--text-color-black);
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 14px; /* Larger font size for readability */
    transition: all 0.3s ease; /* Smooth transition for all properties */
    background-color: var(--btn-background-soft-orange); /* Soft orange background */
    border: 2px solid var(--border-color-transparent); /* Transparent border for a clean look */
    border-radius: 20px; /* Rounded corners for a friendly appearance */
    box-shadow: 0 4px 8px var(--shadow-color-medium); /* Subtle shadow for depth */
    margin: 10px 0; /* Space between buttons */
    display: inline-block; /* Allows buttons to sit side by side */
    text-align: center; /* Center the text inside the button */
    text-decoration: none;
}

.cookie-accept:hover {
    background-color: var(--primary-color);
    color: var(--text-color-white);
}

.cookie-accept:disabled {
    background-color: var(--border-color-ccc);
}

.cookie-accept:not(:disabled):hover {
    background-color: var(--secondary-color); /* Soft orange background */
}

/* Animations and Transitions */
.loading-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background-color: var(--primary-color);
    -webkit-transition: width 0.5s ease; /* Safari/Chrome */
    -moz-transition: width 0.5s ease; /* Firefox */
    transition: width 0.5s ease;
}

#docxButton {
    border: none;
    background-color: transparent;
    cursor: pointer;
    border-radius: 10px;
    padding: 10px;
    transition: all 0.3s ease;
}

#docxButton:hover {
    background-color: var(--background-f0f0f0);
    box-shadow: 0px 4px 8px var(--shadow-color-medium);
}

#docxButton img {
    width: 120px;
    border-radius: 5px; /* Optional, for rounded corners on the image */
}

#checkbox {
    font-size: 11px;
}

.textN {
    text-align: justify;
}

#weiterLink {
    background-color: var(--secondary-color); /* Soft orange background */
    color: var(--text-color-white); /* White text for contrast */
    padding: 10px 20px; /* Slightly larger padding for a bigger click area */
    font-size: 14px; /* Larger font size for readability */
    border: 2px solid var(--border-color-transparent); /* Transparent border for a clean look */
    border-radius: 20px; /* Rounded corners for a friendly appearance */
    cursor: pointer; /* Hand cursor on hover for interactivity */
    transition: all 0.3s ease; /* Smooth transition for all properties */
    box-shadow: 0 4px 8px var(--shadow-color-medium); /* Subtle shadow for depth */
    margin: 10px 0; /* Space between buttons */
    display: inline-block; /* Allows buttons to sit side by side */
    text-align: center; /* Center the text inside the button */
    text-decoration: none;
}

#weiterLink:hover {
    background-color: var(--primary-color);
}

