/* ============================================================================
   simple-diff-checker.css - Page-specific styles for Simple Diff Checker
   ============================================================================
   Loaded by:  webdev-tools/simple-diff-checker.php
   Purpose:    Layout for side-by-side textareas, diff output area, legend,
               and result stats. Scoped under #diffApp to avoid collisions.
   Load order: tool-input.css (base) → this file (overrides/additions).
   ============================================================================ */

/* Side-by-side textarea layout */
#diffApp .dc-input-row {
  display: flex;
  gap: 15px;
  margin-bottom: 10px;
}

#diffApp .dc-col {
  flex: 1;
  min-width: 0;
}

#diffApp .dc-col label {
  color: #198754;
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}

#diffApp .dc-col textarea {
  width: 100%;
  height: 250px;
  box-sizing: border-box;
}

#diffApp .dc-file-row {
  display: flex;
  gap: 15px;
  margin-bottom: 8px;
}

#diffApp .dc-file-row label {
  color: #0d6efd;
  cursor: pointer;
}

#diffApp .dc-file-row input[type="file"] {
  font-size: 14px;
  margin-bottom: 8px;
}

/* Settings row */
#diffApp .dc-settings {
  text-align: center;
  margin: 8px 0 12px;
}

#diffApp .dc-settings label {
  margin: 0 12px;
  white-space: nowrap;
  font-weight: 400;
}

#diffApp .dc-settings input[type="checkbox"] {
  margin-right: 4px;
}

/* Button row */
#diffApp .dc-actions {
  text-align: center;
  margin: 10px 0;
}

/* Diff output area (hidden initially) */
#diffApp #diffOutput {
  display: none;
  overflow-x: auto;
  margin: 10px 0;
}

/* Color legend */
#diffApp .dc-legend {
  text-align: center;
  margin: 8px 0 5px;
  font-size: 14px;
}

#diffApp .dc-legend span {
  margin: 0 10px;
  white-space: nowrap;
}

#diffApp .dc-legend .dc-swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  vertical-align: middle;
  margin-right: 4px;
  border: 1px solid #ccc;
}

#diffApp .dc-swatch-green { background-color: #b6d7a8; }
#diffApp .dc-swatch-red   { background-color: #ea9999; }
#diffApp .dc-swatch-yellow{ background-color: #ffe599; }

/* Result stats */
#diffApp .dc-stats {
  text-align: center;
  font-size: 14px;
  color: #555;
  margin: 6px 0;
}

#diffApp .dc-stats strong {
  color: #168332;
}

/* Go Back / Reset buttons (only shown when diff is visible) */
#diffApp .dc-result-actions {
  text-align: center;
  display: none;
  margin: 10px 0;
}

/* No-differences message */
#diffApp .dc-no-diff {
  text-align: center;
  padding: 20px;
  color: #168332;
  font-weight: 600;
  font-size: 16px;
}

/* Side-by-side example row (Original + Modified) */
.dc-example-row {
  display: flex;
  gap: 15px;
  margin-bottom: 18px;
}

.dc-example-row .example-block {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}

/* Responsive */
@media only screen and (max-width: 768px) {
  #diffApp .dc-input-row {
    flex-direction: column;
    gap: 8px;
  }

  #diffApp .dc-col textarea {
    height: 200px;
  }

  #diffApp .dc-file-row {
    flex-direction: column;
    gap: 4px;
  }

  #diffApp .dc-legend span {
    display: block;
    margin: 4px 0;
  }

  .dc-example-row {
    flex-direction: column;
    gap: 8px;
  }
}
