/* =============================================================
   KingPulse Studio - Cross-Chain Bridge Engine Styles
   ============================================================= */

.bridge-wrapper {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

@media (max-width: 960px) {
  .bridge-wrapper {
    grid-template-columns: 1fr;
  }
}

.bridge-card {
  background: linear-gradient(145deg, rgba(19, 23, 40, 0.9) 0%, rgba(13, 16, 32, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

/* Chain Selector Row */
.bridge-chains-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 14px 16px;
}

.bridge-chain-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.bridge-chain-label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}

.bridge-select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
  width: 100%;
}
.bridge-select:focus {
  border-color: #7ae7c1;
}

.bridge-flip-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(122, 231, 193, 0.1);
  border: 1px solid rgba(122, 231, 193, 0.25);
  color: #7ae7c1;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.3s ease, background 0.2s;
  flex-shrink: 0;
}
.bridge-flip-btn:hover {
  transform: rotate(180deg) scale(1.08);
  background: rgba(122, 231, 193, 0.2);
}

/* Amount & Token Box */
.bridge-input-container {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bridge-input-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.bridge-balance-badge {
  color: var(--muted);
}
.bridge-balance-badge b {
  color: #7ae7c1;
}

.bridge-input-body {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bridge-amount-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  font-family: 'DM Mono', monospace;
  outline: none;
}
.bridge-amount-input::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

.bridge-token-select {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 8px 12px;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

/* Protocols Comparison List */
.bridge-protocols-header {
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.bridge-protocols-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bridge-proto-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.bridge-proto-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(122, 231, 193, 0.25);
}

.bridge-proto-card.selected {
  background: rgba(122, 231, 193, 0.06);
  border-color: rgba(122, 231, 193, 0.5);
  box-shadow: 0 0 15px rgba(122, 231, 193, 0.08);
}

.proto-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.proto-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.proto-icon {
  font-size: 18px;
}
.proto-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
  background: rgba(122, 231, 193, 0.15);
  color: #7ae7c1;
  margin-right: 6px;
}

.proto-receive {
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.proto-time {
  font-size: 10px;
  color: var(--muted);
}

.proto-footer {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 4px;
}

/* Quote Summary Box */
.bridge-quote-summary {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bridge-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}
.bridge-summary-row span {
  color: var(--muted);
}

.highlight-row {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 6px;
  margin-top: 2px;
}

/* Stepper inside Modal */
.bridge-modal-route {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 12px 16px;
  margin: 14px 0;
}
.bridge-m-node {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bridge-m-chain {
  font-size: 11px;
  color: var(--muted);
}
.bridge-m-arrow {
  font-size: 12px;
  color: #7ae7c1;
  font-weight: 700;
}

.bridge-stepper {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
  text-align: right;
}

.b-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 10px 12px;
  transition: all 0.3s ease;
}

.b-step.active {
  background: rgba(122, 231, 193, 0.08);
  border-color: rgba(122, 231, 193, 0.3);
}
.b-step.completed {
  background: rgba(122, 231, 193, 0.04);
  border-color: rgba(122, 231, 193, 0.2);
}

.b-step-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.b-step.active .b-step-icon {
  background: #7ae7c1;
  color: #000;
  box-shadow: 0 0 10px rgba(122, 231, 193, 0.5);
  animation: pulseIcon 1.2s infinite ease-in-out;
}
.b-step.completed .b-step-icon {
  background: rgba(122, 231, 193, 0.2);
  color: #7ae7c1;
}

@keyframes pulseIcon {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.b-step-text b {
  font-size: 12px;
  display: block;
  margin-bottom: 2px;
}
.b-step-status {
  font-size: 11px;
  color: var(--muted);
}
.b-step.active .b-step-status {
  color: #7ae7c1;
}

/* History Card */
.bridge-history-card {
  background: linear-gradient(145deg, rgba(19, 23, 40, 0.85) 0%, rgba(13, 16, 32, 0.85) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bridge-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: 700;
}

.bridge-history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bridge-history-item {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.b-hist-route {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}
.b-hist-chain {
  font-weight: 700;
}
.b-hist-arrow {
  color: var(--muted);
  font-size: 11px;
}

.b-hist-amt {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.b-hist-proto {
  font-size: 10px;
  color: var(--muted);
}

.b-hist-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.b-hist-time {
  font-size: 10px;
  color: var(--muted);
}
