/* ══════════════════════════════════════
   CASE CONVERTER — style.css
   ══════════════════════════════════════ */

/* Case Button Grid */
.cc-btn-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.cc-case-btn {
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8f9ff;
  color: #374151;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
  white-space: nowrap;
}

.cc-case-btn:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e40af;
}

.cc-case-btn.active {
  background: #00296b;
  border-color: #00296b;
  color: #fff;
  font-weight: 600;
}

/* Clear Button */
.cc-clear-btn {
  padding: 5px 16px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  color: #374151;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
  white-space: nowrap;
}
.cc-clear-btn:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

/* Copy Button */
.cc-copy-btn {
  padding: 8px 22px;
  background: #00296b;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.cc-copy-btn:hover {
  background: #001f54;
}

/* Cases Table */
.cc-cases-table {
  margin-top: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
}

.cc-case-row {
  display: grid;
  grid-template-columns: 140px 160px 1fr;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid #f1f5f9;
  gap: 12px;
}

.cc-case-row:last-child {
  border-bottom: none;
}

.cc-case-row:nth-child(even) {
  background: #f8f9ff;
}

.cc-case-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: #00296b;
}

.cc-case-example {
  font-size: 0.88rem;
  color: #1e40af;
  font-family: monospace;
  background: #eff6ff;
  padding: 2px 8px;
  border-radius: 4px;
}

.cc-case-use {
  font-size: 0.85rem;
  color: #64748b;
}

/* ── Dark Mode ── */
body.dark-mode .cc-case-btn {
  background: #1e2235;
  border-color: #2a2f45;
  color: #94a3b8;
}
body.dark-mode .cc-case-btn:hover {
  background: #252a3d;
  border-color: #3b4a6b;
  color: #93c5fd;
}
body.dark-mode .cc-case-btn.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}
body.dark-mode .cc-clear-btn {
  background: #1e2235;
  border-color: #2a2f45;
  color: #94a3b8;
}
body.dark-mode .cc-clear-btn:hover { background: #252a3d; }
body.dark-mode .cc-copy-btn        { background: #2563eb; }
body.dark-mode .cc-copy-btn:hover  { background: #1d4ed8; }

body.dark-mode .cc-cases-table     { border-color: #2a2f45; }
body.dark-mode .cc-case-row        { border-color: #2a2f45; }
body.dark-mode .cc-case-row:nth-child(even) { background: #1e2235; }
body.dark-mode .cc-case-name       { color: #60a5fa; }
body.dark-mode .cc-case-example    { background: #1e2235; color: #93c5fd; }
body.dark-mode .cc-case-use        { color: #64748b; }

body.dark-mode #cc-input,
body.dark-mode #cc-output {
  background: #1e2235 !important;
  border-color: #2a2f45 !important;
  color: #cdccca !important;
}

/* ── Main Section Equal Height ── */
#main-section {
  align-items: stretch;
}

#main-section section {
  display: flex;
  flex-direction: column;
}

#cc-input {
  flex: 1;
  min-height: 200px;
}

#cc-output {
  flex: 1;
  min-height: 120px;
}

/* ── Mobile ── */
@media (max-width: 768px) {
  .cc-btn-grid { grid-template-columns: repeat(2, 1fr); }
  .cc-case-row { grid-template-columns: 1fr 1fr; }
  .cc-case-use { display: none; }
}
@media (max-width: 420px) {
  .cc-btn-grid { grid-template-columns: repeat(2, 1fr); }
}