/* EMDR section-specific styles */
.emdr-menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1em;
  margin: 2em 0;
}
.emdr-menu button {
  width: 340px;
  padding: 0.75em 1em;
  border-radius: 1.5em;
  border: 1.5px solid #888;
  background: #f8f8f8;
  font-size: 1.1em;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  margin: 0;
  outline: none;
  display: block;
}
.emdr-menu button:hover {
  background: #e0f0ff;
  border-color: #3399cc;
}

/* Add padding to prompt content when debug button might be visible */
#session-view .prompt-content {
    padding-bottom: 50px; /* Adjust as needed to make room for debug button */
}

/* 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 */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
  display: flex; /* Use flexbox for layout */
  align-items: flex-start; /* Align to top instead of center */
  justify-content: center; /* Center horizontally */
}

.modal.hidden {
    display: none !important;
}

.modal-content {
  background-color: #fefefe;
  margin: 20vh auto 2em auto; /* Fixed top offset, centered horizontally */
  padding: 20px;
  border: 1px solid #888;
  width: 80%; /* Could be more or less, depending on screen size */
  max-width: 600px;
  border-radius: 8px;
  position: relative;
  box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2), 0 6px 20px 0 rgba(0,0,0,0.19);
  animation-name: animatetop;
  animation-duration: 0.4s
}

/* Specific overrides for Raw Data viewer to maximize space */
#raw-data-modal .modal-content {
    margin-top: 3vh;
    margin-bottom: 3vh;
    max-height: 94vh;
    max-width: 90vw;
}

/* Add Animation */
@keyframes animatetop {
  from {top: -300px; opacity: 0}
  to {top: 0; opacity: 1}
}

.close-button {
  color: black;
  border: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: bold;
  position: absolute;
  right: 15px;
  top: 15px;
  cursor: pointer;
  line-height: 1;
  border: 1pt solid white;
}

.close-button:hover,
.close-button:focus {
  background-color: #f0f0f0;
  text-decoration: none;
  border: 1pt solid darkred;
  color: darkred;
}

.modal-body {
  padding: 20px 16px 2px 16px;
}

/* Vertical Slider Logic */
#setting-vertical-container:hover #setting-vertical-popup,
#setting-vertical-popup:hover {
    display: flex !important;
}

/* Ensure range input looks okay vertical */
input[type=range] {
    cursor: pointer;
}

/* Tooltip Link Style */
.tooltip {
    text-decoration: none !important;
    font-weight: normal !important;
    border-bottom: none !important;
}

/* Settings Tabs */
.settings-tabs-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.tab-btn {
    background: none;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-weight: bold;
    border-bottom: 3px solid transparent;
    transition: border-bottom-color 0.2s, color 0.2s;
    color: #666;
}

.tab-btn:hover {
    color: var(--rgcb-2-dark);
}

.tab-btn.active {
    border-bottom-color: var(--rgcb-2-dark);
    color: var(--rgcb-2-dark);
}

.settings-tab.hidden {
    display: none;
}

/* Responsive Progress Table & Charts */
@media screen and (max-width: 600px) {
  .progress-table thead {
    display: none;
  }
  .progress-table tr {
    display: block;
    margin-bottom: 1em;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 0.5em;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  }
  .progress-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5em 0;
    border: none;
    border-bottom: 1px solid #eee;
    text-align: right;
  }
  .progress-table td:last-child {
    border-bottom: none;
  }
  .progress-table td::before {
    content: attr(data-label);
    font-weight: bold;
    margin-right: 1em;
    text-align: left;
    color: #555;
    flex: 1;
  }
}