/* Extracted from index.html. Shared tool modal shell and close-button styles. */

.tool-modal {
  position: fixed;
  inset: 0;
  z-index: 30000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  padding: 20px;
}

.tool-modal.show {
  display: flex;
}

.tool-modal.result-preview-mode {
  padding: 8px;
}

.tool-modal-card {
  width: min(560px, 92vw);
  min-height: 260px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}

html.theme-dark .tool-modal-card {
  background: #202020;
  border-color: rgba(255, 255, 255, 0.09);
}

.tool-modal-card.growth-dev-survey-detail-modal-card {
  width: min(1360px, calc(100vw - 56px));
  max-height: min(90vh, 940px);
  min-height: min(620px, 90vh);
  padding: 18px;
  border-radius: 20px;
}

.tool-modal-card.growth-dev-survey-detail-modal-card .tool-modal-content {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.tool-modal-card.growth-dev-survey-detail-modal-card .tool-modal-content::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.tool-modal-card.growth-dev-survey-detail-modal-card .tool-modal-title {
  font-size: 18px;
  font-weight: 760;
}

@media (max-width: 920px) {
  .tool-modal-card.growth-dev-survey-detail-modal-card {
    width: min(100%, calc(100vw - 24px));
    max-height: calc(100vh - 24px);
    min-height: 0;
    padding: 16px;
    border-radius: 20px;
  }
}

.tool-modal-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-right: 22px;
}

.tool-modal-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.tool-modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 16px;
  height: 16px;
  border: 0;
  border-radius: 999px;
  background: #ff5c60;
  color: #fff;
  cursor: pointer;
  font-size: 0;
  line-height: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.14);
  padding: 0;
  transform: scale(1);
  transition: transform 0.16s ease, filter 0.18s ease, box-shadow 0.2s ease;
}

.tool-modal-close:hover {
  transform: scale(1.2);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
  filter: brightness(1.04);
}

.tool-modal-content {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.my-prompts-close,
.generate-history-close,
.generate-case-close,
.client-dev-survey-modal-close,
.independent-task-restore-close,
.reverse-result-close {
  font-size: 0;
  line-height: 0;
}

.my-prompts-close,
.generate-history-close,
.client-dev-survey-modal-close,
.reverse-result-close,
.independent-task-restore-close,
.case-monthly-stats-close-btn {
  transition: transform 0.16s ease, box-shadow 0.2s ease, filter 0.18s ease;
}

.generate-case-close {
  transition: transform 0.16s ease, box-shadow 0.2s ease, filter 0.18s ease;
}

.my-prompts-close:hover,
.generate-history-close:hover,
.generate-case-close:hover,
.client-dev-survey-modal-close:hover,
.independent-task-restore-close:hover,
.reverse-result-close:hover {
  transform: scale(1.2);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
  filter: brightness(1.03);
}

.case-monthly-stats-close-btn:hover {
  transform: scale(1.2);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
  filter: brightness(1.03);
}

.my-prompts-close:active,
.generate-history-close:active,
.generate-case-close:active,
.client-dev-survey-modal-close:active,
.independent-task-restore-close:active,
.reverse-result-close:active,
.case-monthly-stats-close-btn:active {
  transform: scale(1.14);
}

.generate-case-close,
.tool-modal-close,
.client-dev-survey-modal-close,
.independent-task-restore-close,
.reverse-result-close,
.my-prompts-close,
.generate-history-close,
.case-monthly-stats-close-btn {
  color: #fff;
}
