@charset "UTF-8";

.doc-tool-card {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 28px;
}

.upload-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.upload-dropzone {
  display: block;
  width: 100%;
  border: 2px dashed #d8dee8;
  border-radius: 22px;
  background: linear-gradient(180deg, #f8fbff 0%, #f3f6fb 100%);
  cursor: pointer;
  transition: all 0.2s ease;
}

.upload-dropzone:hover,
.upload-dropzone.dragover,
.upload-dropzone.is-dragover {
  border-color: #9fb7ff;
  background: linear-gradient(180deg, #f4f8ff 0%, #eef4ff 100%);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(59, 130, 246, 0.08);
}

.upload-dropzone-inner {
  min-height: 160px;
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.upload-main-text {
  margin: 0;
  color: #1f2937;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.5;
}

.upload-desktop-text {
  display: block;
}

.upload-mobile-text {
  display: none;
}

.upload-file-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  margin-left: 6px;
  border: none;
  border-radius: 999px;
  background: #6d7df6;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(109, 125, 246, 0.22);
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.2s ease;
}

.upload-file-chip:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
}

.upload-sub-text {
  margin: 0;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.7;
}

.notice-strip {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid #e6ebf2;
  border-radius: 16px;
  background: #f8fafc;
  color: #5b6472;
  font-size: 14px;
  line-height: 1.75;
}

.notice-strip strong {
  color: #111827;
  white-space: nowrap;
}

.doc-tool-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 22px;
  align-items: start;
}

.doc-tool-sidebar,
.doc-tool-main {
  min-width: 0;
}

.doc-tool-sidebar {
  padding: 22px;
  border: 1px solid #e9edf3;
  border-radius: 22px;
  background: #fbfcfe;
}

.doc-tool-sidebar .utility-field-label {
  display: block;
  margin-bottom: 8px;
}

.doc-tool-sidebar .utility-input {
  width: 100%;
  min-height: 48px;
  margin-bottom: 18px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid #dde4ee;
  background: #ffffff;
  box-sizing: border-box;
}

.doc-tool-sidebar .utility-input:focus {
  outline: none;
  border-color: #9db2ff;
  box-shadow: 0 0 0 4px rgba(109, 125, 246, 0.10);
}

.toggle-box {
  margin-top: 4px;
  margin-bottom: 20px;
  padding: 16px;
  border: 1px solid #e8edf4;
  border-radius: 18px;
  background: #ffffff;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: #111827;
}

.toggle-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #6d7df6;
  flex-shrink: 0;
}

.toggle-help {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.75;
  color: #6b7280;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.doc-tool-sidebar .utility-btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.doc-tool-sidebar .utility-btn {
  flex: 1 1 0;
  min-width: 120px;
  min-height: 48px;
}

.doc-tool-sidebar .utility-btn-primary,
.preview-download.utility-btn-primary {
  background: linear-gradient(135deg, #6d7df6 0%, #5b6df0 100%);
  border: none;
  color: #fff;
  box-shadow: 0 10px 24px rgba(109, 125, 246, 0.22);
}

.preview-download {
  width: 100%;
  margin-top: 14px;
}

.preview-download:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.preview-card {
  padding: 20px;
  border: 1px solid #e9edf3;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.preview-card h3 {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 800;
  color: #111827;
}

.file-preview-wrap {
  min-height: 220px;
  padding: 24px 20px;
  border: 1px solid #e5eaf1;
  border-radius: 18px;
  background: linear-gradient(180deg, #f8fafc 0%, #f4f7fb 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
  overflow: hidden;
}

.result-preview-wrap {
  background: linear-gradient(180deg, #fbfcff 0%, #f5f7fe 100%);
}

.file-preview-icon {
  width: 96px;
  height: 96px;
  border-radius: 26px;
  background: linear-gradient(135deg, #64748b 0%, #475569 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.5px;
  box-shadow: 0 12px 28px rgba(71, 85, 105, 0.18);
  flex-shrink: 0;
}

.result-icon {
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  box-shadow: 0 12px 28px rgba(79, 70, 229, 0.20);
}

.file-preview-content {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.file-preview-title {
  max-width: 100%;
  font-size: 18px;
  font-weight: 800;
  color: #111827;
  line-height: 1.5;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.file-preview-desc {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.75;
  color: #6b7280;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.preview-meta {
  margin-top: 12px;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.8;
  word-break: keep-all;
  overflow-wrap: anywhere;
  text-align: center;
}

#docResultBox.utility-result-box {
  margin-top: 0;
  border-radius: 18px;
  border: 1px solid #e7ecf3;
  background: linear-gradient(180deg, #fbfdff 0%, #f5f8fc 100%);
  color: #334155;
  line-height: 1.8;
  box-shadow: none;
}

@media (max-width: 960px) {
  .doc-tool-card {
    padding: 22px;
  }

  .doc-tool-grid {
    grid-template-columns: 1fr;
  }

  .doc-tool-sidebar {
    padding: 20px;
  }

  .preview-grid {
    grid-template-columns: 1fr;
  }

  .file-preview-wrap {
    min-height: 190px;
  }
}

@media (max-width: 768px) {
  .doc-tool-card {
    padding: 18px;
  }

  .upload-dropzone {
    border-style: solid;
    border-width: 1px;
    border-radius: 20px;
  }

  .upload-desktop-text {
    display: none;
  }

  .upload-mobile-text {
    display: block;
  }

  .upload-dropzone-inner {
    min-height: 124px;
    padding: 22px 16px;
  }

  .upload-main-text {
    font-size: 18px;
  }

  .upload-sub-text {
    font-size: 13px;
  }

  .notice-strip {
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
  }

  .doc-tool-sidebar {
    padding: 18px;
    border-radius: 18px;
  }

  .preview-card {
    padding: 16px;
    border-radius: 18px;
  }

  .file-preview-wrap {
    min-height: 180px;
    padding: 18px 16px;
    border-radius: 14px;
    gap: 14px;
  }

  .file-preview-icon {
    width: 78px;
    height: 78px;
    font-size: 22px;
    border-radius: 22px;
  }

  .file-preview-title {
    font-size: 16px;
  }

  .file-preview-desc,
  .preview-meta {
    font-size: 13px;
  }

  .doc-tool-sidebar .utility-btn {
    width: 100%;
    flex: 1 1 100%;
  }
}