/**
 * public/css/tools/border-radius-generator.css
 * Border Radius Generator  —  prefix: brg-
 * Accent: #0D9488 (teal)
 * Loads after: style.css · desktop.css · tool-cards.css · design-tools-shared.css
 */

/* ── tc-icon--violet ── */
.tc-icon--violet { background: #F5F3FF; color: #7C3AED; }

.brg-card {
  padding: 0 !important;
  overflow: hidden;
}

.brg-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.brg-left {
  flex: 1 1 280px;
  padding: 28px;
  border-right: 1px solid #f1f5f9;
  display: flex;
  flex-direction: column;
  gap: 24px;
  background: #fafafa;
}

.brg-right {
  flex: 1 1 300px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Section label */
.brg-label {
  display: block;
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.brg-section {
  display: flex;
  flex-direction: column;
}

/* Presets */
.brg-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.brg-preset {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 7px 14px;
  cursor: pointer;
  font-family: inherit;
  font-size: .8rem;
  color: var(--text-secondary);
  font-weight: 600;
  transition: all .18s, transform .15s cubic-bezier(.34,1.56,.64,1);
  min-height: 36px;
}
.brg-preset:hover {
  background: #ccfbf1;
  border-color: #5eead4;
  color: #0f766e;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(13,148,136,.2);
}
.brg-preset.active {
  background: #0d9488;
  border-color: #0d9488;
  color: #fff;
  transform: scale(1.04);
  box-shadow: 0 4px 12px rgba(13,148,136,.3);
}

/* Unit toggle */
.brg-units {
  display: flex;
  gap: 0;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  overflow: hidden;
  width: fit-content;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}

.brg-unit-opt { display: flex; }
.brg-unit-opt input { display: none; }
.brg-unit-opt span {
  padding: 8px 20px;
  cursor: pointer;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface);
  border-right: 1.5px solid var(--border);
  transition: background .15s, color .15s;
  user-select: none;
}
.brg-unit-opt:last-child span { border-right: none; }
.brg-unit-opt input:checked + span {
  background: #0d9488;
  color: #fff;
  font-weight: 800;
}

/* Link label */
.brg-link-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: .875rem;
  color: var(--text-primary);
  font-weight: 600;
  user-select: none;
}

/* Corner sliders */
.brg-field { margin-bottom: 12px; }
.brg-field:last-child { margin-bottom: 0; }

.brg-field-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brg-corner-label {
  font-size: .77rem;
  color: var(--text-muted);
  font-weight: 700;
  min-width: 94px;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.brg-range {
  flex: 1;
  accent-color: #0d9488;
  cursor: pointer;
}

.brg-num {
  width: 60px;
  font-size: .82rem;
  text-align: center;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  padding: 6px 6px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  min-height: 36px;
}
.brg-num:focus {
  border-color: #0d9488;
  box-shadow: 0 0 0 3px rgba(13,148,136,.12);
}

/* Preview */
.brg-preview-wrap { flex: 1; min-height: 230px; }

.brg-preview-outer {
  background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 100%);
  border: 1.5px solid #b2f5ea;
  border-radius: 16px;
  min-height: 230px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brg-preview-box {
  width: 170px;
  height: 130px;
  background: linear-gradient(135deg, #0d9488 0%, #0891b2 100%);
  position: relative;
  transition: border-radius .12s cubic-bezier(.34,1.56,.64,1);
  box-shadow: 0 10px 32px rgba(13,148,136,.28), 0 3px 8px rgba(0,0,0,.1);
}

.brg-corner-hint {
  position: absolute;
  font-size: .64rem;
  font-weight: 700;
  color: rgba(255,255,255,.75);
  font-family: 'Courier New', Courier, monospace;
  line-height: 1;
}

/* Output */
.brg-output {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.brg-output-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.brg-code {
  flex: 1;
  background: #0f172a;
  color: #e2e8f0;
  padding: 16px 18px;
  border-radius: 12px;
  font-size: .83rem;
  font-family: 'Courier New', Courier, monospace;
  word-break: break-all;
  white-space: pre-wrap;
  line-height: 1.6;
  border: 1px solid #1e293b;
}

.brg-copy-btn {
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px 20px;
  font-family: inherit;
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity .15s, transform .15s cubic-bezier(.34,1.56,.64,1), box-shadow .15s;
  box-shadow: 0 2px 8px rgba(13,148,136,.3);
  min-height: 44px;
}
.brg-copy-btn:hover {
  opacity: .9;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(13,148,136,.4);
}
.brg-copy-btn:active { transform: scale(.97); }
.brg-copy-btn.copied {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  box-shadow: 0 2px 8px rgba(22,163,74,.3);
}

@media (max-width: 720px) {
  .brg-layout { flex-direction: column; }
  .brg-left { border-right: none; border-bottom: 1px solid #f1f5f9; }
  .brg-preview-outer { min-height: 190px; }
}
@media (max-width: 480px) {
  .brg-left, .brg-right { padding: 20px 16px; }
  .brg-corner-label { min-width: 78px; }
  .brg-preview-box { width: 135px; height: 100px; }
}
