/**
 * ThreadByteCreative — Image DPI & Print Quality Checker Stylesheet
 */

:root {
  --bg-primary: #FAF6F0;
  --bg-card: #FFFFFF;
  --ink: #1F1914;
  --muted: #6E6259;
  --line: #E8DFD5;
  --line-light: #F3EDE6;
  --accent: #C8956A;
  --accent-hover: #B68257;
  --accent-soft: #F9F3EC;
  --success: #15803D;
  --success-bg: #DCFCE7;
  --warning: #B45309;
  --warning-bg: #FEF3C7;
  --danger: #B91C1C;
  --danger-bg: #FEE2E2;
  --font-heading: 'Outfit', 'Playfair Display', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(43, 33, 24, 0.05);
  --shadow-md: 0 4px 14px rgba(43, 33, 24, 0.08);
}

body {
  background-color: var(--bg-primary);
  color: var(--ink);
  font-family: var(--font-body);
  margin: 0;
  padding: 0;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* Hero Section */
.dpi-hero {
  padding: 40px 0 28px;
  text-align: center;
}

.dpi-crumbs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}

.dpi-crumbs a {
  color: var(--muted);
  text-decoration: none;
}

.dpi-crumbs a:hover {
  color: var(--accent);
}

.dpi-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 12px;
  border: 1px solid #EEDCC8;
}

.dpi-hero h1 {
  font-family: var(--font-heading);
  font-size: 38px;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}

.dpi-hero-sub {
  font-size: 16px;
  color: var(--muted);
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Workspace Layout */
.dpi-workspace {
  display: grid;
  grid-template-columns: 460px 1fr;
  gap: 28px;
  align-items: start;
  margin-bottom: 60px;
}

@media (max-width: 960px) {
  .dpi-workspace {
    grid-template-columns: 1fr;
  }
}

/* Panels */
.dpi-panel {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.control-section {
  padding-bottom: 22px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line-light);
}

.control-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.control-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 14px;
}

.control-title-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ink);
  color: #FFF;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Dropzone */
.dropzone {
  border: 2px dashed #D5C8B8;
  border-radius: var(--radius-md);
  padding: 28px 16px;
  text-align: center;
  background: #FAF7F2;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.dropzone:hover, .dropzone.is-dragover {
  border-color: var(--accent);
  background: #FFF9F3;
}

.dropzone-file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.dropzone-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  color: var(--accent);
}

.dropzone-text {
  font-weight: 700;
  font-size: 14.5px;
  color: var(--ink);
  margin-bottom: 4px;
}

.dropzone-hint {
  font-size: 12px;
  color: var(--muted);
}

/* Uploaded Image Card */
.image-preview-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #FAF7F2;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-top: 12px;
}

.image-preview-thumb {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #FFF;
}

.image-preview-meta {
  flex: 1;
  min-width: 0;
}

.image-preview-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.image-preview-stats {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.btn-icon-danger {
  background: none;
  border: none;
  color: var(--danger);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}

.btn-icon-danger:hover {
  background: var(--danger-bg);
}

/* Chips / Buttons */
.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}

.btn-group-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip-btn {
  background: #FAF6F0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s ease;
}

.chip-btn:hover {
  border-color: #C8956A;
  background: #FFF;
}

.chip-btn.active {
  background: var(--ink);
  color: #FFF;
  border-color: var(--ink);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #FAF7F2;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  box-sizing: border-box;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
  background: #FFF;
}

/* Right Panel: Results & Gauges */
.dpi-results-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Verdict Banner */
.verdict-banner {
  background: #FFFFFF;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.verdict-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.verdict-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.verdict-badge.excellent { background: var(--success-bg); color: var(--success); }
.verdict-badge.good { background: #E0F2FE; color: #0369A1; }
.verdict-badge.fair { background: var(--warning-bg); color: var(--warning); }
.verdict-badge.poor { background: var(--danger-bg); color: var(--danger); }

.verdict-dpi-stat {
  font-family: var(--font-heading);
  font-size: 38px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1;
}

.verdict-dpi-stat small {
  font-size: 16px;
  font-weight: 700;
  color: var(--muted);
  margin-left: 4px;
}

/* Meter Bar */
.dpi-meter-track {
  height: 12px;
  background: #E8DFD5;
  border-radius: 999px;
  position: relative;
  overflow: hidden;
  margin: 14px 0 8px;
}

.dpi-meter-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #EF4444 0%, #F59E0B 40%, #10B981 80%, #059669 100%);
  transition: width 0.4s ease;
}

.dpi-meter-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 16px;
}

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

/* 4-Stat Grid for Max Quality Dimensions */
.max-sizes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}

.max-size-card {
  background: #FAF7F2;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: border-color 0.15s ease;
}

.max-size-card:hover {
  border-color: #D5C8B8;
}

.max-size-dpi {
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 4px;
}

.max-size-value {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.2;
}

.max-size-sub {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 4px;
}

/* Size Recommendation Matrix Table */
.table-card {
  background: #FFF;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}

.table-card h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 6px;
}

.table-card p {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 16px;
}

.dpi-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.dpi-table th {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1.5px solid var(--line);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.dpi-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-light);
  color: var(--ink);
}

.dpi-table tr:hover td {
  background: #FAF8F4;
}

.pill-sm {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}
.pill-sm.excellent { background: var(--success-bg); color: var(--success); }
.pill-sm.good { background: #E0F2FE; color: #0369A1; }
.pill-sm.fair { background: var(--warning-bg); color: var(--warning); }
.pill-sm.poor { background: var(--danger-bg); color: var(--danger); }

/* Viewing Distance Card */
.viewing-distance-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #FAF7F2;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-top: 14px;
}

.viewing-distance-icon {
  font-size: 26px;
  color: var(--accent);
  flex-shrink: 0;
}

.viewing-distance-text strong {
  display: block;
  font-size: 13.5px;
  color: var(--ink);
  margin-bottom: 2px;
}

.viewing-distance-text span {
  font-size: 12.5px;
  color: var(--muted);
}

/* Privacy & Footer */
.privacy-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--muted);
  background: #FAF7F2;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-top: 14px;
}
