/* app/javascript/react/style.css */
div.dashboard-header, div.dashboard-container {
  margin-top: 2rem;
}

div.permission_card .ant-form-item {
  margin-bottom: 4px;
}

div.pageheader-user, div.site-page-header {
  padding-left: 0 !important;
}

.ant-form label {
  font-weight: 400;
}

.ant-image-preview-operations {
  background-color: #717171;
}

.table-link:hover {
  text-decoration: underline;
}

.dashboard-data-table-wrapper table p {
  display: inline;
}

body {
  font-size: 14px;
}

.editable-cell {
  position: relative;
}

.editable-cell-value-wrap {
  cursor: pointer;
  padding: 5px 12px;
}

.editable-row:hover .editable-cell-value-wrap {
  border: 1px solid #d9d9d9;
  border-radius: 2px;
  padding: 4px 11px;
}

p.ant-upload-hint {
  color: #00000073;
  font-size: 14px;
}

p.red-text {
  color: red;
}

p.green-text {
  color: green;
}

[data-theme="dark"] .editable-row:hover .editable-cell-value-wrap {
  border: 1px solid #434343;
}

.ant-collapse.admin-access-collapse > .ant-collapse-item > .ant-collapse-header, .ant-collapse.admin-access-collapse .ant-collapse-item .ant-collapse-content ul {
  padding-left: 0;
}

@media (-ms-high-contrast: none), (-ms-high-contrast: active) {
  .ant-menu-overflow-item {
    height: 100% !important;
  }
}

div.documentedActionCard div.ant-card-body {
  padding: 15px !important;
}

li.documentedActionCard {
  padding: 5px !important;
}

div.predefinedActions {
  margin: 15px 0;
}

div.predefinedActions .ant-flex-gap-small {
  gap: 0;
}

div.powerbi-report-container {
  height: 1000px;
}

li.edit-question-action-list ul {
  margin-top: -5px;
}

/* app/javascript/react/components/static/css/QuestionnaireOverview.css */
.header-section {
  margin-bottom: 32px;
}

.header-section h1 {
  color: #1a1a1a;
  margin-bottom: 8px;
  font-size: 28px;
  font-weight: 600;
}

.subtitle {
  color: #666;
  margin-bottom: 24px;
  font-size: 16px;
}

.info-banner {
  background: #f8f9fa;
  border-left: 4px solid #1890ff;
  border-radius: 8px;
  margin-bottom: 32px;
  padding: 16px 24px;
}

.info-banner p {
  color: #444;
  margin-bottom: 8px;
}

.questionnaire-card:hover {
  cursor: pointer;
  border: 1px solid #e6f7ff;
}

.followup-question-card {
  transition: all .3s;
  box-shadow: 0 1px 2px #0000001a;
}

.followup-question-card:hover {
  box-shadow: 0 2px 8px #00000026;
}

.selected-answer {
  font-weight: bold;
}

.followup-modal-content {
  overflow-y: auto;
  max-height: 300px;
}

.followup-questions-container {
  margin-top: 8px;
}

.questionnaire-list {
  display: grid;
  gap: 24px;
}

.questionnaire-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px #0000001f;
}

.questionnaire-media {
  flex-shrink: 0;
  width: 200px;
}

.questionnaire-card:hover .image-container img {
  transform: scale(1.03);
}

.questionnaire-details {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
}

.card-header h2 {
  color: #1a1a1a;
  margin: 0;
  font-size: 16px;
  font-weight: 500;
}

.status-tag {
  align-self:  center;
  padding: 4px 8px;
  font-weight: 500;
}

.meta-section {
  color: #666;
  flex: 1;
  margin: 8px 0;
  font-size: 13px;
}

.action-buttons button {
  display: flex;
  align-items:  center;
  gap: 6px;
}

.questionnaire-card .card-content {
  display: flex;
  align-items:  center;
  gap: 16px;
}

.image-container img {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.questionnaire-details {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 12px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items:  center;
  margin-bottom: 16px;
}

.card-content {
  display: flex;
  flex-direction: row;
  align-items:  center;
  gap: 24px;
}

.image-container {
  overflow: hidden;
  display: flex;
  background: #f0f2f5;
  border-radius: 8px;
  flex-shrink: 0;
  justify-content: center;
  align-items:  center;
  width: 120px;
  height: 120px;
}

.details-section {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 16px;
}

.meta-section p {
  color: #666;
  margin: 8px 0;
  font-size: 14px;
}

.action-buttons {
  display: flex;
  gap: 12px;
  margin-top: auto;
}

.questionnaire-card.selected-for-reorder {
  background-color: #e6f7ff;
  transform: scale(1.01);
  box-shadow: 0 0 0 2px #1890ff;
}

.reorder-mode-banner {
  display: flex;
  background-color: #fff8e1;
  border: 1px solid #ffe57f;
  border-radius: 4px;
  justify-content: space-between;
  align-items:  center;
  margin-bottom: 16px;
  padding: 8px 16px;
}

.reorder-placement-area {
  cursor: pointer;
  display: flex;
  border-radius: 4px;
  justify-content: center;
  align-items:  center;
  height: 40px;
  margin: 4px 0;
  transition: background-color .2s;
}

.reorder-placement-area.hover {
  background-color: #1890ff1a;
}

.placement-indicator {
  position: relative;
  background-color: #1890ff;
  width: 100%;
  height: 3px;
}

.placement-indicator:before {
  content: "Place here";
  position: absolute;
  color: #fff;
  white-space: nowrap;
  background: #1890ff;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 12px;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
}

.reorder-instructions {
  display: flex;
  justify-content: flex-end;
  align-items:  center;
  margin-top: 8px;
}

.selected-text {
  color: #1890ff;
  font-weight: 500;
}

.questionnaire-card {
  position: relative;
  margin-bottom: 30px;
  transition: box-shadow .3s;
}

.questionnaire-card:hover {
  box-shadow: 0 4px 12px #00000026;
}

.card-hover-actions {
  position: absolute;
  z-index: 10;
  opacity: 0;
  visibility: hidden;
  background-color: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 4px;
  padding: 4px 8px;
  transition: opacity .2s, visibility .2s;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 2px 8px #00000026;
}

.questionnaire-card:hover .card-hover-actions {
  opacity: 1;
  visibility: visible;
}

.card-hover-actions .ant-btn {
  height: 30px;
  font-size: 12px;
}

.card-hover-actions .ant-btn-group > .ant-btn:not(:first-child) {
  margin-left: 1px;
}

.sticky-banner {
  position: sticky;
  z-index: 100;
  top: 0;
}

.reorder-mode-banner.sticky-banner {
  margin-bottom: 16px;
  padding: 10px 16px;
  box-shadow: 0 2px 8px #00000026;
}

.reorder-placement-area {
  display: flex;
  border: 2px dashed #0000;
  border-radius: 4px;
  justify-content: center;
  align-items:  center;
  height: 40px;
  margin: 8px 0;
  transition: all .2s;
}

.reorder-placement-area.hover {
  background-color: #1890ff1a;
  border-color: #1890ff;
}

.placement-indicator {
  color: #1890ff;
  font-weight: bold;
}

.questionnaire-card.selected-for-reorder {
  border: 2px solid #1890ff;
  box-shadow: 0 0 10px #1890ff4d;
}

.followup-questions-container {
  margin-bottom: 16px;
}

.followup-question-card {
  transition: all .3s;
  box-shadow: 0 1px 2px #0000001a;
}

.followup-question-card:hover {
  box-shadow: 0 2px 8px #00000026;
}

.followup-question-header {
  display: flex;
  justify-content: space-between;
  align-items:  center;
  margin-bottom: 8px;
}

.followup-question-header h3 {
  margin: 0;
  font-size: 16px;
}

.followup-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.followup-question-card {
  transition: all .3s;
  box-shadow: 0 1px 2px #0000001a;
}

.followup-question-card:hover {
  box-shadow: 0 2px 8px #00000026;
}

.followup-questions-container {
  position: relative;
  margin-left: 40px;
}

.sticky-banner {
  position: sticky;
  z-index: 1000;
  display: flex;
  background-color: #ffb84d;
  border-radius: 4px;
  justify-content: space-between;
  align-items:  center;
  margin-bottom: 16px;
  padding: 12px;
  top: 0;
  box-shadow: 0 2px 8px #00000026;
}

.reorder-mode-banner {
  animation: fadeIn .3s;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.followup-questions-container:before {
  content: "";
  position: absolute;
  background-color: #e8e8e8;
  width: 2px;
  top: 0;
  bottom: 0;
  left: 15px;
}

.followup-card {
  border-left: 3px solid #1890ff;
  margin-bottom: 15px;
}

.followup-trigger {
  border-bottom: 1px dashed #e8e8e8;
  margin-bottom: 10px;
  padding-bottom: 8px;
}

.followup-questions-container .questionnaire-card:before {
  content: "";
  position: absolute;
  background-color: #e8e8e8;
  width: 20px;
  height: 2px;
  top: 20px;
  left: -25px;
}

.selected-answer {
  font-weight: bold;
}

.followup-modal-content {
  overflow-y: auto;
  max-height: 300px;
}

.followup-questions-container {
  margin-top: 8px;
}

.multiselect-card {
  border-left: 4px solid #1890ff;
}

.multiselect-card .ant-list {
  margin-bottom: 10px;
}

.multiselect-card .ant-divider-inner-text {
  color: #1890ff;
  font-weight: bold;
}

/* app/javascript/react/components/static/css/TimelineEditor.css */
.timeline-container {
  display: flex;
  position: relative;
  gap: 24px;
  height: calc(100vh - 200px);
  padding: 16px;
}

.questions-list-container {
  flex: 0 0 280px;
  height: 100%;
}

.questions-list {
  overflow-y: auto;
  background: #fff;
  border-radius: 8px;
  height: 100%;
  padding: 16px;
  box-shadow: 0 2px 8px #0000001a;
}

.list-title {
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 8px;
  margin-bottom: 16px !important;
}

.week-header {
  text-align: center;
  background: #fafafa;
  border-radius: 8px;
  margin-bottom: 24px;
  padding: 16px;
}

.timeline {
  overflow-x: auto;
  position: relative;
  flex: 1;
  height: 100%;
}

.week-container {
  position: relative;
  height: 100%;
}

.days-row {
  display: flex;
  gap: 16px;
  height: 100%;
}

.day-column-container {
  width: 240px;
  min-width: 240px;
  transition: width .2s;
}

.day-column:not(.collapsed):empty {
  width: 280px;
  min-width: 280px;
}

.day-column:not(.collapsed) {
  min-height: calc(100vh - 200px);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items:  flex-start;
}

.delete-btn {
  width: 16px;
  height: 16px;
  margin-left: 8px;
  padding: 0;
  font-size: 16px;
  line-height: 1;
}

.day-header {
  position: sticky;
  z-index: 2;
  display: flex;
  cursor: pointer;
  background: #fff;
  border-radius: 8px;
  justify-content: space-between;
  align-items:  center;
  margin-bottom: 8px;
  padding: 8px 12px;
  transition: all .2s;
  top: 0;
  box-shadow: 0 2px 8px #0000001a;
}

.day-header.key-day {
  z-index: 3;
  background: #fff2f0;
  border: 2px solid #ff4d4f;
}

.day-title {
  font-size: 14px;
  margin: 0 !important;
}

.day-actions {
  display: flex;
  align-items:  center;
  gap: 4px;
}

.day-column {
  overflow-y: auto;
  background: #fff;
  border-radius: 0 0 8px 8px;
  flex-grow: 1;
  max-height: calc(100% - 50px);
  box-shadow: 0 2px 8px #0000001a;
}

.day-content {
  padding: 12px;
}

.question-card, .timeline-card {
  cursor: move;
  border: 1px solid #f0f0f0;
  width: 100%;
  margin-bottom: 12px;
  transition: transform .2s;
}

.question-card:hover, .timeline-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px #0000001a;
}

.question-description {
  display: block;
  color: #666;
  margin: 8px 0;
}

.question-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.settings-sidebar {
  position: fixed;
  z-index: 1000;
  background: #fff;
  width: 300px;
  padding: 24px;
  top: 0;
  bottom: 0;
  right: 0;
  box-shadow: -4px 0 12px #0000001a;
}

.sidebar-title {
  display: flex;
  justify-content: space-between;
  align-items:  center;
  margin-bottom: 24px !important;
}

.settings-menu {
  border-right: 0 !important;
}

.day-column-container.collapsed {
  width: 36px !important;
  min-width: 36px !important;
}

.day-header.collapsed-header {
  position: sticky;
  z-index: 2;
  border-radius: 8px;
  flex-direction: column;
  justify-content: flex-start;
  align-items:  center;
  height: 100%;
  margin-bottom: 8px;
  padding: 6px 4px;
  top: 0;
  background: #fff !important;
}

.day-header.collapsed-header .day-title {
  writing-mode: vertical-rl;
  white-space: nowrap;
  text-align: center;
  transform: rotate(180deg);
  color: inherit !important;
  margin: 8px 0 !important;
  font-size: 12px !important;
}

.day-header.collapsed-header .day-actions {
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.day-header.collapsed-header .ant-btn {
  display: flex;
  justify-content: center;
  align-items:  center;
  width: 22px;
  min-width: 22px;
  height: 22px;
  padding: 0;
}

.day-header.collapsed-header.key-day {
  border: 2px solid #ff4d4f;
  background: #fff2f0 !important;
}

.day-column-container.collapsed .day-column {
  display: none;
}

.day-column-container.collapsed.weekend .day-header {
  background: #f5f5f5;
}

/* app/javascript/react/components/static/css/ProjectOverview.css */
.project-overview {
  padding: 20px;
}

.project-overview h1 {
  margin-bottom: 10px;
  font-size: 28px;
}

.project-overview .subtitle {
  color: #666;
  margin-bottom: 30px;
  font-size: 16px;
}

.project-list {
  margin-top: 30px;
}

.project-card {
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px #0000001a;
}

.project-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items:  center;
  margin-bottom: 16px;
}

.project-card h2 {
  margin: 0;
  font-size: 18px;
}

.card-content {
  display: flex;
  gap: 20px;
}

.image-fallback {
  display: flex;
  background-color: #f5f5f5;
  border-radius: 6px;
  justify-content: center;
  align-items:  center;
  width: 80px;
  height: 80px;
}

.details-section {
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

.meta-section p {
  margin-bottom: 6px;
}

.action-buttons {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

/* app/javascript/react/components/static/css/ProjectQuestionnaires.css */
.project-questionnaires {
  padding: 20px;
}

.project-questionnaires .page-header {
  margin-bottom: 30px;
}

.project-questionnaires h1 {
  margin: 15px 0 10px;
  font-size: 28px;
}

.project-questionnaires .subtitle {
  color: #666;
  margin-bottom: 20px;
  font-size: 16px;
}

.card-tags {
  display: flex;
  align-items:  center;
  gap: 8px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items:  flex-start;
}

.card-header h2 {
  flex: 1;
  margin-right: 16px;
}

.back-link {
  display: inline-block;
  color: #1890ff;
  margin-bottom: 10px;
  font-size: 14px;
}

.header-actions {
  margin-top: 15px;
}

.questionnaire-list {
  margin-top: 20px;
}

.questionnaire-card {
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px #0000001a;
}

.questionnaire-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items:  center;
  margin-bottom: 16px;
}

.header-tags {
  display: flex;
  gap: 8px;
}

.questionnaire-card h2 {
  margin: 0;
  font-size: 18px;
}

.card-content {
  display: flex;
  gap: 20px;
}

.image-fallback {
  display: flex;
  background-color: #f5f5f5;
  border-radius: 6px;
  justify-content: center;
  align-items:  center;
  width: 80px;
  height: 80px;
}

.details-section {
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

.meta-section p {
  margin-bottom: 6px;
}

.action-buttons {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.empty-state {
  text-align: center;
  padding: 30px;
}

.empty-state p {
  color: #666;
  margin-bottom: 20px;
  font-size: 16px;
}
