/**
 * EDDM Instant Artwork Check Styles
 * @package EDDM
 * @since 2026-10-08
 */

/* Preview wrapper */
.eddm-instant-preview {
  position: relative;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  margin: 12px 0;
}

.eddm-instant-preview-canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

.eddm-instant-preview-img {
  display: block;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.eddm-instant-preview-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  color: #6b7280;
  font-size: 14px;
}

/* Guide overlays */
.eddm-guide-trim,
.eddm-guide-safe,
.eddm-guide-bleed {
  z-index: 10;
}

.eddm-guide-indicia {
  z-index: 15;
}

.eddm-guide-legend {
  z-index: 20;
}

/* Verdict panel */
.eddm-instant-verdict {
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  margin: 12px 0;
}

.eddm-instant-verdict-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  font-size: 16px;
  font-weight: 600;
}

.eddm-instant-verdict--pass .eddm-instant-verdict-header {
  background: #dcfce7;
  color: #166534;
}

.eddm-instant-verdict--warning .eddm-instant-verdict-header {
  background: #fef3c7;
  color: #92400e;
}

.eddm-instant-verdict--fail .eddm-instant-verdict-header {
  background: #fee2e2;
  color: #991b1b;
}

.eddm-instant-verdict--checking .eddm-instant-verdict-header {
  background: #e0e7ff;
  color: #3730a3;
}

.eddm-instant-verdict-icon {
  font-size: 20px;
  line-height: 1;
}

.eddm-instant-verdict-summary {
  padding: 12px 16px;
  font-size: 14px;
  color: #374151;
  border-bottom: 1px solid #e5e7eb;
}

/* Checks list */
.eddm-instant-verdict-checks {
  list-style: none;
  margin: 0;
  padding: 12px 16px;
}

.eddm-instant-check {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  padding: 8px 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 14px;
  line-height: 1.5;
}

.eddm-instant-check:last-child {
  border-bottom: none;
}

.eddm-instant-check-icon {
  flex-shrink: 0;
  width: 18px;
  text-align: center;
  font-weight: 600;
}

.eddm-instant-check--pass .eddm-instant-check-icon {
  color: #16a34a;
}

.eddm-instant-check--warning .eddm-instant-check-icon {
  color: #d97706;
}

.eddm-instant-check--fail .eddm-instant-check-icon {
  color: #dc2626;
}

.eddm-instant-check-name {
  font-weight: 500;
  color: #374151;
}

.eddm-instant-check-message {
  color: #4b5563;
}

.eddm-instant-check-detail {
  width: 100%;
  padding-left: 24px;
  margin-top: 4px;
  font-size: 13px;
  color: #6b7280;
}

/* Quick fixes */
.eddm-instant-fixes {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
}

.eddm-instant-fixes-label {
  font-size: 13px;
  font-weight: 500;
  color: #374151;
}

.eddm-instant-fix-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  background: #1d3a5f;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s ease;
  min-height: 40px;
}

.eddm-instant-fix-btn:hover {
  background: #16304f;
}

.eddm-instant-fix-btn:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Final check note */
.eddm-instant-final-note {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #f0f9ff;
  border-top: 1px solid #e0f2fe;
  font-size: 13px;
  color: #0369a1;
}

.eddm-instant-final-icon {
  font-size: 16px;
}

/* Status classes */
.eddm-status-pass {
  color: #166534;
  background: #dcfce7;
}

.eddm-status-warning {
  color: #92400e;
  background: #fef3c7;
}

.eddm-status-fail {
  color: #991b1b;
  background: #fee2e2;
}

.eddm-status-checking {
  color: #3730a3;
  background: #e0e7ff;
}

/* Template downloads */
.eddm-template-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 0;
  margin: 8px 0;
  border-top: 1px solid #e5e7eb;
}

.eddm-template-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #f9fafb;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  color: #374151;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.eddm-template-link:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
  color: #111827;
}

.eddm-template-link-icon {
  font-size: 16px;
}

/* Design help CTA */
.eddm-design-help {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  margin: 12px 0;
}

.eddm-design-help-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.eddm-design-help-text {
  flex: 1;
  font-size: 14px;
  color: #78350f;
}

.eddm-design-help-text strong {
  display: block;
  margin-bottom: 2px;
  color: #92400e;
}

.eddm-design-help-btn {
  flex-shrink: 0;
  padding: 10px 18px;
  background: #f59e0b;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.eddm-design-help-btn:hover {
  background: #d97706;
  color: #ffffff;
}

/* Responsive */
@media (max-width: 600px) {
  .eddm-instant-verdict-header {
    font-size: 15px;
    padding: 10px 14px;
  }

  .eddm-instant-verdict-summary {
    padding: 10px 14px;
    font-size: 13px;
  }

  .eddm-instant-verdict-checks {
    padding: 10px 14px;
  }

  .eddm-instant-check {
    font-size: 13px;
  }

  .eddm-instant-fixes {
    padding: 10px 14px;
    flex-direction: column;
    align-items: stretch;
  }

  .eddm-instant-fix-btn {
    justify-content: center;
    width: 100%;
  }

  .eddm-design-help {
    flex-direction: column;
    text-align: center;
  }

  .eddm-design-help-btn {
    width: 100%;
    justify-content: center;
  }
}

.eddm-tip{border-bottom:1px dotted currentColor;cursor:help}
.eddm-swap-sides{margin:8px 0 12px;text-align:center;font-size:.9rem}
.eddm-swap-sides-btn,.eddm-fn-swap-sides{background:none;border:0;padding:0;font:inherit;color:#1a73e8;text-decoration:underline;text-underline-offset:2px;cursor:pointer}
.eddm-2page-hint{margin:0 0 12px;font-size:.85rem;color:#475569;line-height:1.45}
