/* IGW PDF Merger v1.1 */

.igw-pdf-merger {
  max-width: 960px;
  margin: 40px auto;
  padding: 20px;
  font-family: inherit;
  box-sizing: border-box;
}

.igw-pdf-merger * {
  box-sizing: border-box;
}

.igw-pdf-panel {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  padding: 34px;
  box-shadow: 0 16px 45px rgba(15, 23, 42, 0.08);
}

.igw-pdf-header {
  text-align: center;
  margin-bottom: 26px;
}

.igw-pdf-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #374151;
  font-size: 13px;
  font-weight: 700;
}

.igw-pdf-panel h2 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
  color: #111827;
  letter-spacing: -0.03em;
}

.igw-pdf-intro {
  max-width: 680px;
  margin: 0 auto;
  color: #6b7280;
  font-size: 16px;
  line-height: 1.65;
}

.igw-upload-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  min-height: 190px;
  border: 2px dashed #cbd5e1;
  border-radius: 20px;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  margin-bottom: 16px;
  padding: 28px;
}

.igw-upload-box:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  transform: translateY(-1px);
}

.igw-upload-box input {
  display: none;
}

.igw-upload-icon {
  font-size: 34px;
  margin-bottom: 10px;
}

.igw-upload-box strong {
  font-size: 20px;
  font-weight: 800;
  color: #111827;
}

.igw-upload-box small {
  margin-top: 8px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.5;
}

.igw-limit-box {
  display: grid;
  gap: 8px;
  margin: 0 0 20px;
  padding: 14px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #fafafa;
  color: #475569;
  font-size: 14px;
}

.igw-limit-box ul {
  margin: 0;
  padding-left: 20px;
}

.igw-limit-box li {
  margin: 3px 0;
}

.igw-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 4px 0 18px;
}

.igw-file-count {
  font-size: 14px;
  color: #475569;
  font-weight: 700;
}

.igw-file-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 22px;
}

.igw-file-empty {
  padding: 18px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #fafafa;
  color: #6b7280;
  text-align: center;
  font-size: 14px;
}

.igw-file-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto auto;
  gap: 8px;
  align-items: center;

  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #ffffff;
}

.igw-file-name {
  min-width: 0;
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.igw-file-size {
  font-size: 13px;
  color: #6b7280;
  white-space: nowrap;
}

.igw-small-btn {
  border: 1px solid #d1d5db;
  background: #f9fafb;
  color: #374151;
  border-radius: 10px;
  padding: 7px 10px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  transition: all 0.18s ease;
}

.igw-small-btn:hover:not(:disabled) {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.igw-small-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.igw-primary-btn,
.igw-secondary-btn {
  border: none;
  border-radius: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
}

.igw-primary-btn {
  width: 100%;
  padding: 15px 18px;
  background: #111827;
  color: #ffffff;
  font-size: 16px;
}

.igw-primary-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.18);
}

.igw-primary-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  box-shadow: none;
}

.igw-secondary-btn {
  padding: 10px 14px;
  background: #f3f4f6;
  color: #374151;
  font-size: 14px;
}

.igw-secondary-btn:hover {
  background: #e5e7eb;
}

.igw-status {
  min-height: 22px;
  margin: 16px 0 0;
  font-size: 14px;
  color: #475569;
  text-align: center;
  line-height: 1.5;
}

.igw-status.igw-error {
  color: #b91c1c;
}

.igw-status.igw-success {
  color: #047857;
}

@media (max-width: 700px) {
  .igw-pdf-merger {
    padding: 12px;
    margin: 24px auto;
  }

  .igw-pdf-panel {
    padding: 22px;
    border-radius: 20px;
  }

  .igw-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .igw-secondary-btn {
    width: 100%;
  }

  .igw-file-item {
    grid-template-columns: 1fr;
  }

  .igw-file-size {
    margin-bottom: 4px;
  }

  .igw-small-btn {
    width: 100%;
    padding: 10px;
  }
}
