/* ============================================================
   Resistor Color Code Calculator — CSS  v1.0.0
   F.Robin Technologies | scoped to .rcc-wrap
   ============================================================ */
.rcc-wrap {
  --rcc-cyan:     #00BFFF;
  --rcc-dark:     #0d0d0d;
  --rcc-dark2:    #1a1a2e;
  --rcc-white:    #ffffff;
  --rcc-off:      #f5f7fa;
  --rcc-border:   #e5e7eb;
  --rcc-grey:     #6b7280;
  --rcc-text:     #1a1a1a;
  --rcc-radius:   10px;
  --rcc-font:     -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  font-family: var(--rcc-font);
  color: var(--rcc-text);
  background: var(--rcc-white);
  border: 1px solid var(--rcc-border);
  border-radius: var(--rcc-radius);
  box-shadow: 0 4px 20px rgba(0,0,0,.09);
  max-width: 680px;
  margin: 2em auto;
  overflow: hidden;
}

/* Header */
.rcc-header {
  background: linear-gradient(135deg, #0d0d0d 0%, #0a1628 100%);
  color: var(--rcc-white);
  padding: 28px 28px 24px;
  text-align: center;
}
.rcc-icon { margin-bottom: 12px; }
.rcc-icon svg { display: inline-block; }
.rcc-title {
  margin: 0 0 6px; font-size: 1.35rem; font-weight: 800;
  color: var(--rcc-white); border: none; padding: 0; line-height: 1.2;
}
.rcc-subtitle { margin: 0; font-size: .85rem; color: rgba(255,255,255,.65); line-height: 1.5; }

/* Body */
.rcc-body { padding: 24px 24px 26px; }

/* Band tabs */
.rcc-band-tabs {
  display: flex; gap: 8px; margin-bottom: 22px;
}
.rcc-tab {
  flex: 1; padding: 9px 0; border: 1.5px solid var(--rcc-border);
  border-radius: 8px; background: var(--rcc-off); color: var(--rcc-grey);
  font-size: .88rem; font-weight: 700; cursor: pointer; font-family: var(--rcc-font);
  transition: all .18s;
}
.rcc-tab:hover { border-color: var(--rcc-cyan); color: var(--rcc-cyan); }
.rcc-tab-active {
  background: var(--rcc-dark); color: var(--rcc-cyan);
  border-color: var(--rcc-cyan);
}

/* Visual resistor */
.rcc-visual {
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 22px; gap: 0;
}
.rcc-wire-l, .rcc-wire-r {
  width: 40px; height: 3px; background: #888; flex-shrink: 0;
}
.rcc-body-visual {
  display: flex; align-items: stretch;
  background: #d4a56a;
  border-radius: 10px;
  height: 36px; min-width: 220px;
  position: relative; overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0,0,0,.2), 0 2px 8px rgba(0,0,0,.15);
}
.rcc-band-vis {
  width: 18px; flex-shrink: 0; transition: background .25s;
}
.rcc-band-vis:first-child { margin-left: 18px; }
.rcc-band-vis + .rcc-band-vis { margin-left: 8px; }
.rcc-gap { flex: 1; background: transparent !important; }
.rcc-band-vis:last-child { margin-right: 12px; }

/* Selectors grid */
.rcc-selectors {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.rcc-sel-wrap { display: flex; flex-direction: column; gap: 5px; }
.rcc-sel-label {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: var(--rcc-grey);
}
.rcc-sel-inner {
  display: flex; align-items: center; gap: 8px;
  border: 1.5px solid var(--rcc-border); border-radius: 7px;
  background: var(--rcc-off); padding: 0 8px 0 6px;
  transition: border-color .18s, box-shadow .18s;
}
.rcc-sel-inner:focus-within {
  border-color: var(--rcc-cyan);
  box-shadow: 0 0 0 3px rgba(0,191,255,.15);
}
.rcc-color-dot {
  width: 16px; height: 16px; border-radius: 50%;
  border: 1.5px solid rgba(0,0,0,.25); flex-shrink: 0;
  background: #333; transition: background .2s;
}
.rcc-select {
  flex: 1; border: none; outline: none; background: transparent;
  font-size: .83rem; font-family: var(--rcc-font); color: var(--rcc-text);
  padding: 8px 0; cursor: pointer; min-width: 0;
}
.rcc-hide-4band { display: none; }
.rcc-show-6band { display: none; }

/* Result panel */
.rcc-result {
  background: var(--rcc-dark);
  border-radius: var(--rcc-radius);
  padding: 20px 22px 18px;
  margin-bottom: 14px;
}
.rcc-result-main {
  display: flex; align-items: baseline; gap: 12px;
  margin-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,.08);
  padding-bottom: 14px;
}
.rcc-res-label {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: rgba(255,255,255,.5);
  white-space: nowrap;
}
.rcc-res-value {
  font-size: 1.75rem; font-weight: 800; color: var(--rcc-cyan);
  font-family: "Courier New", monospace; line-height: 1;
}
.rcc-result-meta {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.rcc-res-meta-item { display: flex; flex-direction: column; gap: 3px; }
.rcc-meta-label {
  font-size: .68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: rgba(255,255,255,.4);
}
.rcc-meta-value {
  font-size: .9rem; font-weight: 700; color: var(--rcc-white);
}
.rcc-tc-row { grid-column: 1 / -1; }

/* Reset button */
.rcc-reset-btn {
  width: 100%; padding: 10px; border: 1.5px solid var(--rcc-border);
  border-radius: 7px; background: var(--rcc-off); color: var(--rcc-grey);
  font-size: .88rem; font-weight: 700; cursor: pointer;
  font-family: var(--rcc-font); transition: all .18s;
}
.rcc-reset-btn:hover { background: #e5e7eb; color: var(--rcc-text); }

/* Responsive */
@media (max-width: 480px) {
  .rcc-selectors { grid-template-columns: 1fr 1fr; }
  .rcc-result-meta { grid-template-columns: 1fr 1fr; }
  .rcc-body { padding: 16px 14px 18px; }
}
