/* style.css */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-image: url("images/SL-040820-29750-27.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed; /* optional: keeps image fixed while scrolling */
  font-family: 'Segoe UI', Tahoma, sans-serif;
  background-color: #f1f5f9;
  color: #1a1a1a;
  line-height: 1.6;
}

a {
  color: #0052cc;
  text-decoration: none;
  font-weight: 500;
}
/*
body {
  font-family: Arial, sans-serif;
  font-size: 16px;
  margin: 0;
  padding: 0;
  background: #f9f9f9;
  color: #222;
}
*/
header {
  background: #004080;
  color: white;
  padding: 15px 0;
  text-align: center;
}

nav {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 10px;
  margin-bottom: 20px;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: bold;
}

nav a:hover {
  text-decoration: underline;
}

main {
  max-width: 900px;
  margin: auto;
  padding: 20px;
}

textarea, select, input[type="password"], input[type="text"], input[type="number"], input[type="email"] {
  width: 100%;
  padding: 10px;
  margin-top: 6px;
  margin-bottom: 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  box-sizing: border-box;
}
textarea:focus,
select:focus,
input[type="password"]:focus,
input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus {
  outline: none;
  border: 1px solid #004080; /* bright blue */

}
}
/*
button {
  padding: 10px 18px;
  margin: 4px 6px 16px 0;
  background-color: #004080;
  border: none;
  color: white;
  font-size: 1rem;
  border-radius: 4px;
  cursor: pointer;
}

button:hover {
  background-color: #003366;
}
*/


.section-title {
  font-weight: bold;
  font-size: 1.2rem;
  margin-top: 20px;
  margin-bottom: 10px;
  border-bottom: 2px solid #004080;
  padding-bottom: 4px;
}

.settings-group {
  margin-bottom: 30px;
  padding-bottom: 10px;
  border-bottom: 1px solid #ccc;
}

label {
  font-weight: 600;
  display: block;
}

.inline-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.inline-buttons button {
  margin-bottom: 0;
  white-space: nowrap;
  flex-shrink: 0;
}
.example-item {
  border: 1px solid #ddd;
  padding: 8px;
  margin-bottom: 8px;
  background: #f9f9f9;
  font-family: monospace;
  white-space: pre-wrap;
  display: flex;
  flex-direction: column;
}

.example-header {
  font-weight: bold;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.remove-btn {
  background-color: #f44336;
  color: white;
  border: none;
  padding: 4px 8px;
  font-size: 0.8em;
  cursor: pointer;
  margin-left: 10px;
}

.remove-btn:hover {
  background-color: #d32f2f;
}

.example-text {
  display: none;
  margin-top: 6px;
  white-space: pre-wrap;
  details > summary {
  cursor: pointer;
}
}
.summary-section {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-bottom: 20px;
  flex-wrap: nowrap;
  flex-direction: row;
}
#renderexamples {
  overflow-x: auto;
  white-space: nowrap;
  max-width: 100%;
  box-sizing: border-box;
  padding-bottom: 10px; /* opcjonalnie, by uniknąć ucięcia dolnych elementów */
}

#renderexamples .example-item {
  display: inline-block;
  vertical-align: top;
  margin-right: 12px;
  min-width: 150px; /* opcjonalnie, by nie były za wąskie */
}
summary {
  cursor: pointer !important;
  user-select: none;
}

summary:hover {
  background-color: #D2E4F0;
}
.recording {
  animation: dimPulse 2s infinite;
  background-color: #d81b60;
  color: white;
  border: 2px solid #b0003a;
}

@keyframes dimPulse {
  0%, 100% { filter: brightness(1); }
  50%      { filter: brightness(0.85); }
}
.instruction-display {
  margin-top: 8px;
  font-size: 0.95em;
}
.admin-tab {
  display: none;
}
.admin-tab.active {
  display: block;
}
input[type="checkbox"] {
  cursor: pointer;
  appearance: auto;
}
#users-table input,
#users-table select {
  padding: 4px;
  width: 100%;
  box-sizing: border-box;
}
.page-header {
  background-color: #123f84;
  color: white;
  padding-bottom: 10px;
  position: relative;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  padding: 10px 5;
}

.header-top h1 {
  margin: 0;
  font-size: 28px;
  text-align: left;
  padding-left: 20px;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 20px; /* space between nav and dropdown */
}
.user-dropdown {
  position: relative; /* changed from absolute */
  transform: none;    /* reset transform since it's now inline */
  top: auto;
  right: auto;
}
.user-dropdown button {
  font-family: inherit;
  font-weight: bold;
  color: white;
  font-size: 1rem;
}

#userDropdownToggle {
  background: none;
  border: none;
  cursor: pointer;
  font-weight: bold;
  color: white;
  padding: 6px 10px;
  border-radius: 6px;
  margin-right: 10px;
}

#userDropdownToggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.dropdown-menu {
  display: none;
  position: absolute;
  right: 10px; /* ⬅ more space from right edge */
  top: 100%;
  background-color: white;
  border: 1px solid #ccc;
  border-radius: 10px; /* ⬅ more rounded corners */
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
  min-width: 160px; /* ⬅ slightly wider */
  padding: 8px 0; /* ⬅ vertical spacing inside menu */
  z-index: 999;
}


.dropdown-menu a {
  display: block;
  padding: 10px 16px;
  text-decoration: none;
  color: #333;
  font-size: 0.95rem;
  border-radius: 6px; /* subtle hover shape */
}

.dropdown-menu a:hover {
  background-color: #f0f4f8;
}


.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 30px;
  padding: 10px 20;
}

.main-nav a {
  color: white;
  font-weight: bold;
  text-decoration: none;
}

.main-nav a:hover {
  text-decoration: underline;
}
.main-nav .dropdown-menu a {
  color: #333 !important;
  background-color: white;
  font-weight: normal;
}

.main-nav .dropdown-menu a:hover {
  background-color: #f5f5f5;
}
.card {
  background-color: #ffffff;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  margin-bottom: 2rem;
}
.input-row {
  display: flex;
  gap: 40px;
  align-items: center;
  margin: 10px 0;
  flex-wrap: wrap; /* responsive fallback */
}

.dropdown-group {
  display: flex;
  align-items: center;
  gap: 10px; 
  margin-right: 20px;
}
.dropdown-group label {
  margin: 0;
  white-space: nowrap; /* keeps label from wrapping */
}

.table-upload {
  margin-top: 1rem;
  padding: 0.5rem;
  background: #f9f9f9;
  border: 1px dashed #ccc;
}
.table-upload input,
.table-upload button {
  margin-left: 0.5rem;
}
.hidden {
  display: none !important;
}

.upload-container {
  margin-top: 1rem;
  padding: 0.5rem;
  background: #f9f9f9;
  border: 1px dashed #ccc;
}

.upload-container input,
.upload-container button {
  margin-left: 0.5rem;
}
#dataGrid th:first-child,
#dataGrid td:first-child {
  width: 40px;
  text-align: center;
}
/* === Doctor Report Embedding UI === */

#embedReportsBtn {
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.3s ease;
}

#embedReportsBtn:hover {
    background-color: #0056b3;
}

#embedStatus {
    margin-top: 10px;
    font-size: 14px;
    color: #333;
}
#outputEditor {
  height: 250px;
}

.readonly-placeholder {
  padding: 10px;
  border: 1px solid #ccc;
  color: #555;
  background: #f8f8f8;
  font-style: italic;
}
.save-copy-button {
  margin-top: 2rem;
}
#outputEditor .ql-editor {
  font-family: Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: #222;
}
#inputText::placeholder {
  font-family: Arial, sans-serif;
  font-size: 1rem;
  color: #999;
  font-style: italic;
}
#outputEditor .ql-editor::before {
  font-family: Arial, sans-serif !important;
  font-size: 1rem !important;
  color: #999 !important;
  font-style: italic !important;
}
.correction-row {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
  gap: 8px;
}

.correction-row input {
  width: 45%;
}

.arrow {
  flex-shrink: 0;
}
.correction-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.correction-controls {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap; /* optional for responsiveness */
}
.container {
  max-width: 960px;
  margin: 2rem auto;
  padding: 1rem;
}
/* Modern Primary Button */
button.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: #004080;
  color: white;
  font-size: 1rem;
  font-weight: 300;
  border: none;
  border-radius: 25px;
  padding: 5px 10px;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding:5px 10px 5px 10px
}

button.icon-btn:hover {
  background-color: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

button.icon-btn:active {
  transform: scale(0.97);
}

/* Secondary Outline Button */
button.icon-btn.secondary {
  background-color: transparent;
  border: 2px solid #2563eb;
  color: #2563eb;
}

button.icon-btn.secondary:hover {
  background-color: #2563eb;
  color: white;
}
.recording-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  background-color: red;
  border-radius: 50%;
  margin-left: 8px;
  animation: pulse 1.2s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.2);
  }
}
.tabulator-row.collapsed-row .tabulator-cell {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  height: 40px;
  cursor: pointer;
}

.tabulator-row.expanded-row .tabulator-cell {
  white-space: normal !important;
  overflow: visible !important;
  height: auto !important;
  cursor: pointer;
}
/* Remove row hover background */
.tabulator-row:hover {
  background-color: transparent !important;
}
.tabulator-row {
  cursor: pointer;
}
.no-data-message {
  color: red;
  font-style: italic;
  margin-top: 1em;
}

.form-note {
    margin-top: 1em;
    font-size: 0.9em;
    color: #555;
    text-align: center;
}
.form-note a {
    color: #007BFF;
    text-decoration: none;
}
.form-note a:hover {
    text-decoration: underline;
}
.form-error {
    color: red;
    font-size: 0.85em;
}
.leave-warning-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.leave-warning-box {
  background: white;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
  max-width: 400px;
  text-align: center;
}

.leave-warning-buttons {
  margin-top: 1rem;
  display: flex;
  justify-content: space-around;
}

.leave-warning-buttons button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 1rem;
}
.button-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.button-left-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.button-right-group {
  margin-left: auto;
}
.transcript-wrapper {
  position: relative;
}

.styled-transcript {
  position: absolute;
  top: 0;
  left: 0;
  padding: 8px;
  width: 100%;
  height: 100%;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  pointer-events: none;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: black;
  z-index: 2;
}

.dictation-box .interim {
  color: gray;
  font-style: italic;
}

.dictation-box {
  border: 1px solid #ccc;
  min-height: 120px;
  padding: 8px;
  font-size: 16px;
  line-height: 1.5;
  font-family: inherit;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  outline: none;
}

/* Simulated placeholder */
.dictation-box:empty::before {
  content: attr(data-placeholder);
  color: #888;
  font-style: italic;
  pointer-events: none;
}
.dictation-box:focus {
  border: 1px solid #004080;
  box-shadow: 0 0 0 2px rgba(0, 64, 128, 0.1); /* optional soft blue glow */
}
#loadingMessage {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 300px; /* fixed height */
  background-color: #f9f9f9;
  border: 1px solid #ccc;
  border-radius: 12px;
  margin-top: 1rem;
}

.loading-box {
  text-align: center;
  max-width: 400px;
  width: 100%;
}

#loadingGif {
  display: block;
  margin: 0 auto 1rem auto;
  max-width: 100%;
  max-height: 180px;
  object-fit: contain;
}

#loadingMessage p {
  font-size: 1.1rem;
  color: #444;
}
#notificationContainer {
  position: fixed;
  top: 0px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.toast-message {
  background-color: #2563eb;
  color: white;
  padding: 10px 20px;
  border-radius: 0 0 8px 8px; /* flat top, rounded bottom */
  margin: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  opacity: 1;
  transition: opacity 1s ease-out;
  font-size: 0.95rem;
  text-align: center;
}
.field-error {
  border: 1.5px solid #f87171; /* soft red-400 */
  box-shadow: 0 0 3px rgba(248, 113, 113, 0.3);
  border-radius: 6px;
  transition: border 0.3s ease, box-shadow 0.3s ease;
}



