* {
    box-sizing: border-box;
}

body {
    font-family: ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;
    /* background-color: #4cbfd2; */
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    /* align-items: center; */
}

header,
footer {
    /* background-color: #ffffff; */
    color: white;
    text-align: center;
    padding: 20px;
    width: 100%;
    /* max-width: 1100px; */
}

footer {
    color: #0f3c4c;
}

main {
    width: 100%;
    /* max-width: 1100px; */
    padding: 20px;
    background-color: #ffffff;
    display: flex;
}



#right {
    flex: 1;
    margin: 10px;
}

#header-section,
#input-section,
#patient-info,
.content-part {
    margin-bottom: 10px;
    margin-right: 40px;
    border-radius: 5px;
    padding: 10px;
}

#text-input {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
    box-sizing: border-box;
    margin-top: 10px;
    border: 1px solid #4cbfd2;
    font-size: 16px;
    outline: none;
}

#header-section {
    display: flex;
    align-items: baseline;
    background-color: white;
}

@media (max-width: 600px) {
    main {
        padding: 10px;
    }

    #header-section,
    #input-section,
    .content-part {
        padding: 10px;
    }

    #text-input,
    button {
        padding: 5px 10px;
    }

    #header-section {
        display: flex;
        flex-direction: column;
    }

    #header-section h2 {
        font-size: 20px;
    }

}



h2 {
    font-size: 24px;
    color: #0f3c4c;
    margin-bottom: 20px;
    font-family: ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;
}

.action-button {
    background-color: #4cbfd2;
    font-family: ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;
    border: none;
    color: whitesmoke;
    padding: 15px;
    text-align: center;
    text-decoration: none;
    font-size: 15px;
    margin: 10px 2px;
    cursor: pointer;
    border-radius: 10px;
    transition: background-color 0.5s ease;
    display: inline;
}

.action-button:hover:enabled {
    background-color: #246474;
}

#header-section h2 {
    flex: 0.35;
    padding: 5px;
}

#header-section .action-button {
    padding: 12px;
}

@keyframes loading {
    0% {
        opacity: .2;
    }

    20% {
        opacity: 1;
    }

    100% {
        opacity: .2;
    }
}

.loading-button {
    padding: 15px;
    font-size: 15px;
    cursor: pointer;
    border: none;
    color: #fff;
    background-color: #4cbfd2;
}

.loading-button span {
    opacity: .9;
    animation: loading 1.4s infinite;
    font-size: 15px;
}

.loading-button span:nth-child(2) {
    animation-delay: .2s;
}

.loading-button span:nth-child(3) {
    animation-delay: .4s;
}

.waiting {
    font-size: 20px;
    opacity: .2;
    animation: loading 1.4s infinite;
}

.waiting :nth-child(2) {
    animation-delay: .2s;
}

.waiting :nth-child(3) {
    animation-delay: .4s;
}

.copyable {
    display: inline;
    /* cursor: grab */
}

.highlight {
    background-color: lightyellow;
}

.highlight-accepted {
    background-color: lightyellow;
}

.highlight-empty {
    border: 2px solid red;
}

.content-part-header {
    display: flex;
    align-items: center;
    background-color: white;
    padding: 10px;
}

.content-part-header h4 {
    margin-right: 10px;
}

.content-part-header .action-button {
    width: 90%;
}

.generated-content {
    background-color: #eeffff;
    padding: 20px;
    padding-right: 50px;
    border: 1px;
    border-style: solid;
    border-color: darkturquoise;
}

#input-section textarea {
    background-color: #eeffff;
}



.bottom-section {
    position: relative;
    bottom: 0;
    width: 100%;
    color: white;
    font-size: 12px;
    margin: none;
    text-align: left;
    padding: 20px;
}


.content-part-footer {
    color: #0f3c4c;
    font-size: 16px;
    padding-top: 5px;
}

.content-part-footer p{
    line-height: 1.5;
}

.hidden {
    display: none;
}

.collapse-btn {
    position: relative;
    top: 90%;
    left: 50%;
    /* transform: translate(-50%, -50%); */
    background-color: #4cbfd2;
    color: whitesmoke;
    border-radius: 10px;
}

#thankYouMessage {
    display: none;
    padding: 10px;
    background-color: #4cbfd2;
    color: #fff;
    border-radius: 5px;
    text-align: center;
    margin: 20px auto;
    /* width: fit-content; */
    transition: all 0.3s ease-in-out;
}

#thankYouMessage.show {
    display: block;
}

.feedback-buttons {
    position: fixed;
    /* Stick to the screen */
    bottom: 160px;
    /* Distance from bottom */
    right: 10px;
    /* Distance from right */
    z-index: 1000;
    /* Ensures it stays on top of other elements */
    display: inline-grid;
    /* Align buttons in a line */
}

.feedback-buttons button {
    background-color: #39b23f;
    /* Green background */
    color: white;
    /* White text */
    border: none;
    /* No border */
    padding: 10px 20px;
    /* Padding around text */
    text-align: center;
    /* Center text */
    text-decoration: none;
    /* No underline */
    display: inline-block;
    /* Align buttons in a line */
    font-size: 16px;
    /* Text size */
    margin: 4px 2px;
    /* Margin between buttons */
    cursor: pointer;
    /* Pointer cursor on hover */
    border-radius: 20px;
    /* Rounded corners */
}

.feedback-buttons .thumbs-down {
    background-color: #ff564a;
    /* Red background for thumbs down */
}

/* Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0, 0, 0, 0.5); /* Black w/ opacity */
}

/* Modal content */
.modal-content {
    background-color: #fefefe;
    margin: 15% auto; /* 5% from the top and centered */
    padding: 20px;
    border: 1px solid #888;
    width: 80%; /* Could be more or less, depending on screen size */
    max-width: 500px;
    overflow-y: auto;
    border-radius: 8px;
    max-height:fit-content;
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

textarea {
    width: 100%;
    padding: 10px 10px;
    margin: 8px 0;
    display: inline-block;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    resize: vertical;
}

#submit-feedback {
    background-color: #4CAF50;
    color: white;
    padding: 14px 20px;
    margin: 8px 0;
    border: none;
    cursor: pointer;
    width: 100%;
}

#submit-feedback:hover {
    background-color: #45a049;
}


.spinner {
    border: 10px solid rgba(255, 255, 255, 0.817);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border-left-color: #4cbfd2;
    z-index: 1003;  
    position: fixed; /* or absolute */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  
    animation: spin 1s linear infinite;
  }
  
  @keyframes spin {
    0% {
      transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
      transform: translate(-50%, -50%) rotate(360deg);
    }
  }

  .overlay {
    position: fixed; 
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5); 
    z-index: 1002; 
  }
  

.account-section {
    padding: 5px 15px;
    border-radius: 15px;
}

.templates-section {
    padding-top: 10px;
    text-align: left;
}

.templates-section li {
    list-style-type: square;
    cursor: pointer;
    padding: 5px;
}

.templates-section li:hover {
    background-color: #36b8d4;
    border-radius: 5px;
    color: whitesmoke;  
}

.templates-section i {
    background-color: #4cbfd2;
    color: whitesmoke;
    padding: 10px;
    font-size: 15px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.5s ease;
    display: inline;
    margin-right: 5px;
}

.templates-section div{
    padding-top: 10px;
}

.sidebar {
    width: 250px;
    height: auto;
    background-color: #eeffff;
}

.sidebar-item {
    margin-bottom: 10px;
    padding: 10px;
    background-color: #ffffff;
    border: 1px solid #4cbfd2;
    cursor: pointer;
    transition: background-color 0.3s;
    position: relative;
}

.sidebar-item:hover, .sidebar-item.selected {
    background-color: #4cbfd2;
    color: white;
    font-weight: bold;

}

.sidebar-item.audio-selected {
    background-color: #e6b800;
    color: white;
    font-weight: bold;
}

.new-session {
    color: #ffffff;
    font-weight: bold;
    background-color: #4cbfd2;
}

.new-session:hover {
    background-color: #246474;
}

.all-notes {
    font-weight: bold;
    background-color: #eeffff;
}

.all-notes:hover {
    background-color: #eeffff;
    color: #333;

}

.note {
    font-size: 14px;
    color: #333;
}

.form-row {
    display: flex;
    flex-wrap: wrap; /* Allows items to wrap onto the next line if not enough space */
    align-items: center; /* Vertically align items in their flex container */
    gap: 20px; /* Adds space between children */
    padding: 20px 0px;
}

.form-item {
    display: flex;
    flex-direction: column; /* Makes the h5 and input stack vertically */
    flex-grow: 1; /* Allows each item to grow and fill the available space */
    min-width: 150px; /* Minimum width of each form item to prevent too much shrinking */
}

input[type="text"], input[type="date"] {
    width: 100%; /* Makes inputs expand to take the full width of their container */
    padding: 8px;
    box-sizing: border-box; /* Includes padding and border in the element's total width and height */
    border: 1px solid #4cbfd2;
}

.delete-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    color: #888;
    font-size: 16px;
    cursor: pointer;
    display: flex; /* Hide delete button by default */
}

.sidebar-item.note:hover .delete-btn {
    display: flex; /* Show delete button on hover */
    position: absolute;
}

.sidebar-item.note:hover .delete-btn:hover {
    display: flex; /* Show delete button on hover */
    position: absolute;
    color: red; /* Highlight the icon when hovered */
}

#deleteConfirm, #cancelButton {
    padding: 10px 20px;
    margin: 10px;
    border: none;
    cursor: pointer;
}

#deleteConfirm {
    background-color: red;
    color: white;
}

#cancelButton {
    background-color: gray;
    color: white;
}

.alpha-banner {
    background-color: #ffffcc; /* Bright yellow for visibility */
    color: #000; /* Black text for contrast */
    text-align: center;
    padding: 10px 0; /* Adds padding above and below the text */
    font-weight: bold; /* Makes the font bold */
    border-bottom: 1px solid #000; /* Adds a border to the bottom of the banner */
    position: relative; /* Keeps the banner at the top when scrolling */
    width: 100%; /* Ensures the banner spans the full width of the viewport */
    box-shadow: 0 2px 4px rgba(0,0,0,0.2); /* Optional: adds shadow for better separation from page content */
    list-style-position: inside;
}

#left {
    flex: none;
    background-color: azure;
    margin: 10px;
}

#messageBox {
    display: none;
    position: fixed;  /* or 'fixed' depending on your needs */
    top: 10%;  /* Distance from the top of the ancestor or viewport */
    left: 50%;  /* Centering the box horizontally */
    transform: translateX(-50%);  /* Ensures it's centered regardless of the width */
    background-color: #4cbfd2;
    border: 1px solid #ccc;
    border-radius: 2px;
    color: white;
    padding: 10px;
    z-index: 1000;  /* Ensures it appears on top of other content */
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);  /* Optional: for better visibility */
}

.all-notes-message {
    font-weight: lighter;
    font-size: smaller;
    padding: 0px;
    margin-top: 5px;
}

.beta-message {
    background-color: #4cbfd2;
    color: white;
    padding: 20px;
    position: relative;
    margin: 20px auto;
    font-weight: bold;
    text-align: center;
    list-style-position: inside;
    border: 2px solid #0f3c4c;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    border-radius: 10px;
}

.beta-message h5 {
    font-size: 1.5em;
    margin-bottom: 15px;
}

.beta-message ul, .beta-message ol {
    text-align: left;
    margin: 0 auto;
    display: inline-block;
}

.beta-message a:hover {
    color: #eee;
}

#newAudioSOAPNote {
    background-color: #ffcc00; /* Bright yellow for visibility */
    font-weight: bold;
    cursor: pointer;
    color: #000;
}

#newAudioSOAPNote:hover {
    background-color: #e6b800;
}

.hidden {
    display: none;
}

#toggle-sidebar-container {
    background: white;
}

@media (max-width: 600px) {
    #left {
        background-color: white;
        margin: 0px;
    }
    #right {
        margin: 0px;
    }
    #left.open {
        background-color: #eeffff;
    }
    #account-section {
        display: none;
    }
    #account-section.open {
        display: inline;
        position: fixed;
        top: 0;
        margin: 10px;
        width: auto;
        height: 100%;
        background-color: #eeffff;
        transition: left 0.3s;
        z-index: 1500; /* Higher z-index to be on top */
        overflow: scroll;
    }
    #sidebar-overlay.open {
        display: block;
        position: fixed;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1400;
    }

    #toggle-sidebar {
        display: block;
        background: white;
    }
}

@media (min-width: 601px) {
    #toggle-sidebar {
        display: none;
        position: relative;
    }
}
#sidebar-overlay {
    display: none;
}
.fb-message {
    background-color: #246474 ;
    color: white;
    position: relative;
    margin: 20px auto;
    font-weight: bold;
    text-align: center;
    padding: 10px
}

.fb-message p {
    line-height: 1.5;
}

.fb-message a {
    color: white;
    text-decoration: none;
}

.fb-message a:hover {
    color: white;
}

#alertModal .modal-content {
    text-align: center;
}

#alertModal h2 {
    margin-bottom: 20px;
}

#alertOkButton {
    background-color: #ffcc00;
    color: white;
    padding: 10px 20px;
    margin-top: 20px;
    border: none;
    cursor: pointer;
}

#alertOkButton:hover {
    background-color: #e6b800;
}

#currentMicrophoneLabel {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    text-align: center;
}

#videoModal .modal-content {
    width: 90%;
    max-width: 800px;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    position: relative;
}

#videoModal iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.sidebar-item.in-progress {
    border-left: 5px solid #e6b800; /* Left border in theme color */
}

.generate-and-language {
    display: flex;
    align-items: center;
    gap: 20px;
}

.language-select {
    display: flex;
    gap: 10px;
}

.language-select h5 {
    margin: 0;
    white-space: nowrap;
}



@media (max-width: 768px) {
    .generate-and-language {
        flex-direction: column;
        align-items: stretch;
    }
    
    .language-select {
        justify-content: space-between;
    }
}

.help-button {
    margin-left: 10px;
    padding: 8px 12px;
    background-color: #007BFF;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

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

/* Telehealth Help Modal Specific Styles */
#telehealthHelpModal .modal-content {
  max-width: 800px;
  line-height: 1.6;
  color: #333;
}

#telehealthHelpModal h2 {
  color: #246474;
  margin-bottom: 25px;
  font-size: 28px;
  border-bottom: 2px solid #4cbfd2;
  padding-bottom: 10px;
}

#telehealthHelpModal h3 {
  color: #246474;
  margin: 25px 0 15px;
  font-size: 22px;
}

#telehealthHelpModal h4 {
  color: #4cbfd2;
  margin: 20px 0 10px;
  font-size: 18px;
}

#telehealthHelpModal p {
  margin-bottom: 15px;
}

#telehealthHelpModal ul, 
#telehealthHelpModal ol {
  margin: 15px 0;
  padding-left: 25px;
}

#telehealthHelpModal li {
  margin-bottom: 8px;
}

/* Benefits and Pro Tips sections */
#telehealthHelpModal .benefits-list li,
#telehealthHelpModal .pro-tips-list li {
  list-style: none;
  padding-left: 25px;
  position: relative;
}

#telehealthHelpModal .benefits-list li:before {
  content: "✓";
  color: #4cbfd2;
  position: absolute;
  left: 0;
}

#telehealthHelpModal .pro-tips-list li:before {
  content: "💡";
  position: absolute;
  left: 0;
}

/* Technical Requirements section */
#telehealthHelpModal .technical-requirements {
  background: #f5f5f5;
  padding: 15px 20px;
  border-radius: 8px;
  margin: 20px 0;
}

/* Note section at bottom */
#telehealthHelpModal em {
  display: block;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #eee;
  color: #666;
  font-style: italic;
}

#telehealthButton {
    position: relative;
    overflow: hidden;  /* This ensures the ribbon doesn't extend outside the button */
}

.ribbon {
    position: absolute;
    top: 0;
    right: -30px;
    transform: rotate(45deg);
    background: #ff564a;  /* Red color for visibility */
    color: white;
    padding: 9px 40px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 1;
}

.template-select {
    padding-top: 5px;
}

.template-select select {
    margin-top: 5px;
    background-color: #eeffff;
    border: 1px solid #0f3c4c;
    border-radius: 5px;
    padding: 5px;
}

.spinner-message {
    border-left-color: #4cbfd2;
    z-index: 1010;  
    position: fixed; /* or absolute */
    top: 70%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #4cbfd2;
    padding: 20px;
    border-radius: 10px;
    font-weight: bold;
    color: white;
    font-size: 16px;
}

/* --- Improved EHR Synced Checkbox Styles --- */
.ehr-synced-container {
  display: flex;
  align-items: center;
  margin: 0 0 4px 0;
  position: absolute;
  left: 12px;
  bottom: 8px;
  z-index: 2;
}
.sidebar-item.note {
  position: relative;
}
.ehr-synced-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
  color: #246474;
  font-weight: 600;
  gap: 8px;
  outline: none;
  user-select: none;
  transition: color 0.2s;
}
.ehr-synced-label:focus {
  box-shadow: 0 0 0 2px #4cbfd2;
  border-radius: 4px;
}
.ehr-synced-checkbox {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #246474;
  border-radius: 5px;
  background: #fff;
  margin: 0;
  position: relative;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ehr-synced-checkbox:checked {
  border-color: #39b23f;
  background: #eaffea;
}
.ehr-synced-checkbox:focus {
  box-shadow: 0 0 0 2px #4cbfd2;
}
.ehr-synced-checkbox:hover {
  border-color: #4cbfd2;
}
.ehr-synced-custom-checkbox {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  position: absolute;
  left: 0;
  pointer-events: none;
}
.ehr-synced-checkbox:not(:checked) + .ehr-synced-custom-checkbox .ehr-synced-checkmark {
  display: none;
}
.ehr-synced-checkbox:checked + .ehr-synced-custom-checkbox .ehr-synced-checkmark {
  display: block;
}
.ehr-synced-checkmark {
  width: 16px;
  height: 16px;
  stroke: #39b23f;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  background: none;
  display: block;
  margin: 1px 0 0 1px;
}
.ehr-synced-label-text {
  margin-left: 24px;
  font-size: 14px;
  color: #246474;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.ehr-synced-error {
  color: #ff564a;
  background: #fff6f6;
  border: 1px solid #ff564a;
  border-radius: 4px;
  font-size: 12px;
  margin-top: 2px;
  padding: 3px 8px;
  display: none;
  position: absolute;
  left: 0;
  bottom: -28px;
  z-index: 10;
  min-width: 120px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
/* --- End Improved EHR Synced Checkbox Styles --- */