/* ── IFSC Code Finder – Styles ───────────────────────────────────────────── */

.ifsc-wrap {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  max-width: 780px;
  margin: 2rem auto;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 28px rgba(0,0,0,0.08);
  color: #1e293b;
}

/* ── Header ─────────────────────────────────────────────────────────────── */

.ifsc__header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.ifsc__icon {
  font-size: 2.4rem;
  line-height: 1;
  flex-shrink: 0;
}

.ifsc__title {
  font-size: 1.55rem;
  font-weight: 800;
  margin: 0 0 0.25rem;
  color: #0f172a;
}

.ifsc__desc {
  font-size: 0.88rem;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

/* ── Info box ────────────────────────────────────────────────────────────── */

.ifsc__info-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 0.85rem 1.1rem;
  font-size: 0.86rem;
  color: #1e3a8a;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* ── Search ──────────────────────────────────────────────────────────────── */

.ifsc__search-wrap {
  margin-bottom: 1.5rem;
}

.ifsc__search-row {
  display: flex;
  gap: 0.6rem;
  align-items: stretch;
  flex-wrap: wrap;
}

.ifsc__input-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.ifsc__input {
  width: 100%;
  padding: 0.75rem 3.5rem 0.75rem 1rem;
  border: 2px solid #cbd5e1;
  border-radius: 10px;
  font-size: 1.1rem;
  font-family: 'Courier New', Courier, monospace;
  font-weight: 700;
  color: #0f172a;
  background: #f8fafc;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ifsc__input:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124,58,237,0.12);
  background: #fff;
}

.ifsc__input-counter {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.7rem;
  color: #94a3b8;
  font-weight: 600;
  pointer-events: none;
}

.ifsc__btn {
  padding: 0.75rem 1.6rem;
  border: none;
  border-radius: 10px;
  background: #7c3aed;
  color: #fff;
  font-size: 0.97rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  white-space: nowrap;
}

.ifsc__btn:hover  { background: #6d28d9; }
.ifsc__btn:active { transform: scale(0.97); }

.ifsc__btn--reset {
  background: #e2e8f0;
  color: #334155;
}
.ifsc__btn--reset:hover { background: #cbd5e1; }

.ifsc__format-hint {
  font-size: 0.78rem;
  color: #64748b;
  margin: 0.55rem 0 0;
  line-height: 1.5;
}

.ifsc__code-eg {
  font-family: 'Courier New', Courier, monospace;
  background: #f1f5f9;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  font-size: 0.82rem;
  color: #7c3aed;
  font-weight: 700;
}

/* ── Loading ─────────────────────────────────────────────────────────────── */

.ifsc__loading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  color: #64748b;
  font-size: 0.9rem;
}

.ifsc__spinner {
  width: 20px;
  height: 20px;
  border: 3px solid #e2e8f0;
  border-top-color: #7c3aed;
  border-radius: 50%;
  animation: ifsc-spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes ifsc-spin {
  to { transform: rotate(360deg); }
}

/* ── Error ───────────────────────────────────────────────────────────────── */

.ifsc__error {
  padding: 0.85rem 1rem;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 10px;
  color: #b91c1c;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* ── Results ─────────────────────────────────────────────────────────────── */

.ifsc__results {
  border-top: 2px solid #f1f5f9;
  padding-top: 1.5rem;
  margin-top: 0.5rem;
}

/* Result header */
.ifsc__result-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: #f5f3ff;
  border: 2px solid #ddd6fe;
  border-radius: 12px;
  margin-bottom: 1.25rem;
}

.ifsc__result-bank-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.ifsc__result-bank-name {
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.ifsc__result-branch {
  font-size: 0.84rem;
  color: #64748b;
  margin-top: 0.15rem;
}

.ifsc__result-code-badge {
  margin-left: auto;
  background: #7c3aed;
  color: #fff;
  font-family: 'Courier New', Courier, monospace;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0.4rem 0.9rem;
  border-radius: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Cards grid */
.ifsc__cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

@media (max-width: 560px) {
  .ifsc__cards-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 380px) {
  .ifsc__cards-grid { grid-template-columns: 1fr; }
}

.ifsc__card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.ifsc__card--highlight {
  background: #f5f3ff;
  border-color: #c4b5fd;
}

.ifsc__card-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #64748b;
}

.ifsc__card-value {
  font-size: 0.97rem;
  font-weight: 700;
  color: #0f172a;
  word-break: break-word;
}

.ifsc__card--highlight .ifsc__card-value {
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.05rem;
  color: #7c3aed;
  letter-spacing: 0.08em;
}

/* Address box */
.ifsc__address-box {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.75rem;
}

.ifsc__address-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #64748b;
}

.ifsc__address-value {
  font-size: 0.9rem;
  color: #374151;
  line-height: 1.5;
}

.ifsc__maps-link {
  font-size: 0.78rem;
  color: #7c3aed;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.1rem;
}

.ifsc__maps-link:hover { text-decoration: underline; }

/* Contact row */
.ifsc__contact-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 1rem;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  font-size: 0.86rem;
}

.ifsc__contact-label {
  font-weight: 700;
  color: #374151;
  flex-shrink: 0;
}

.ifsc__contact-value {
  color: #15803d;
  font-weight: 600;
}

/* Payment badges */
.ifsc__badges-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.ifsc__badge-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #64748b;
  margin-right: 0.25rem;
}

.ifsc__badge {
  padding: 0.28rem 0.8rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: #e2e8f0;
  color: #94a3b8;
  transition: background 0.2s, color 0.2s;
}

.ifsc__badge--active {
  background: #dcfce7;
  color: #15803d;
}

.ifsc__badge--inactive {
  background: #fee2e2;
  color: #dc2626;
  text-decoration: line-through;
}

/* Copy row */
.ifsc__copy-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ifsc__copy-btn {
  padding: 0.5rem 1.2rem;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: #374151;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.ifsc__copy-btn:hover {
  background: #f1f5f9;
  border-color: #7c3aed;
  color: #7c3aed;
}

.ifsc__copy-confirm {
  font-size: 0.82rem;
  font-weight: 700;
  color: #15803d;
}

/* ── Popular banks panel ─────────────────────────────────────────────────── */

.ifsc__banks-panel {
  margin-top: 1.75rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.1rem 1.4rem;
}

.ifsc__banks-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #374151;
  margin: 0 0 0.85rem;
}

.ifsc__banks-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.55rem;
}

@media (max-width: 580px) {
  .ifsc__banks-grid { grid-template-columns: repeat(2, 1fr); }
}

.ifsc__bank-tag {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.6rem 0.75rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  background: #fff;
}

.ifsc__bank-tag:hover {
  border-color: var(--bank-color, #7c3aed);
  background: #f5f3ff;
}

.ifsc__bank-tag-code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--bank-color, #7c3aed);
}

.ifsc__bank-tag-name {
  font-size: 0.72rem;
  color: #64748b;
  line-height: 1.3;
}

/* ── Facts panel ─────────────────────────────────────────────────────────── */

.ifsc__facts {
  margin-top: 1.5rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.1rem 1.4rem;
}

.ifsc__facts-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #374151;
  margin: 0 0 0.85rem;
}

.ifsc__facts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

@media (max-width: 520px) {
  .ifsc__facts-grid { grid-template-columns: 1fr; }
}

.ifsc__fact {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  font-size: 0.81rem;
  color: #475569;
  line-height: 1.5;
}

.ifsc__fact strong {
  font-size: 0.84rem;
  color: #0f172a;
}
