/* ============================================
   PAYGUARD — Fee Calculator Page Styles
   ============================================ */

/* Page hero base styles live in style.css (shared) */

.ph-shape-1 {
  width: 500px; height: 500px;
  background: var(--primary);
  top: -200px; left: -100px;
}
.ph-shape-2 {
  width: 300px; height: 300px;
  background: var(--accent);
  bottom: -100px; right: 100px;
}


/* ── Main Layout ── */
.calc-main {
  padding: 60px 0 80px;
}

.calc-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 28px;
  align-items: start;
}

/* ── Left Panel ── */
.calc-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: sticky;
  top: 88px;
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.panel-header i {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(79,70,229,0.15);
  border: 1px solid rgba(79,70,229,0.25);
  border-radius: var(--radius-sm);
  color: var(--primary-light);
  font-size: 1rem;
  flex-shrink: 0;
}
.panel-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
}

/* ── Form Elements ── */
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.amount-wrap input {
  width: 100%;
  padding: 12px 80px 12px 44px;
  background: var(--bg-card-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 700;
  font-family: var(--font);
  transition: border-color var(--transition);
  -moz-appearance: textfield;
}
.amount-wrap input::-webkit-outer-spin-button,
.amount-wrap input::-webkit-inner-spin-button { -webkit-appearance: none; }
.amount-wrap input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.15);
}

.currency-prefix {
  position: absolute;
  left: 16px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  pointer-events: none;
  z-index: 1;
}

.input-suffix-tag {
  position: absolute;
  right: 10px;
  padding: 4px 10px;
  background: rgba(79,70,229,0.15);
  border: 1px solid rgba(79,70,229,0.25);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary-light);
  pointer-events: none;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: end;
  margin-bottom: 20px;
}

.select-wrap {
  position: relative;
}
.select-wrap select {
  width: 100%;
  padding: 12px 38px 12px 14px;
  background: var(--bg-card-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color var(--transition);
}
.select-wrap select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.15);
}
.select-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.7rem;
  pointer-events: none;
}

.swap-btn-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-bottom: 0;
  height: 46px;
}

.swap-btn {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(79,70,229,0.12);
  border: 1.5px solid rgba(79,70,229,0.25);
  border-radius: 50%;
  color: var(--primary-light);
  cursor: pointer;
  font-size: 0.8rem;
  transition: all var(--transition);
}
.swap-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: rotate(180deg);
}

/* Speed options */
.speed-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.speed-opt {
  display: flex;
  align-items: center;
  cursor: pointer;
}
.speed-opt input[type="radio"] {
  display: none;
}
.speed-opt span {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-card-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.speed-opt span i { color: var(--text-muted); font-size: 0.9rem; }
.speed-opt input[type="radio"]:checked + span {
  background: rgba(79,70,229,0.1);
  border-color: rgba(79,70,229,0.4);
  color: var(--primary-light);
}
.speed-opt input[type="radio"]:checked + span i {
  color: var(--primary-light);
}

.calc-btn {
  width: 100%;
  justify-content: center;
  margin-top: 8px;
  font-size: 1rem;
  padding: 14px;
}

/* Rate info box */
.rate-info-box {
  margin-top: 20px;
  padding: 16px;
  background: rgba(6,182,212,0.06);
  border: 1px solid rgba(6,182,212,0.2);
  border-radius: var(--radius-sm);
}
.rate-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.rate-info-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}
.rate-info-val {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent);
}
.rate-info-note {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 10px;
  display: flex;
  gap: 6px;
}
.rate-info-note i { color: var(--accent); flex-shrink: 0; margin-top: 1px; }

/* ── Right Panel ── */
.results-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 400px;
}

/* Empty state */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 40px;
  min-height: 400px;
}
.empty-icon {
  width: 80px; height: 80px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(79,70,229,0.1);
  border: 1px solid rgba(79,70,229,0.2);
  border-radius: var(--radius-lg);
  font-size: 2rem;
  color: var(--primary-light);
  margin-bottom: 22px;
}
.empty-state h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.empty-state p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  max-width: 360px;
  line-height: 1.6;
}

/* Results content */
.results-content { padding: 28px; }

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.results-title h2 {
  font-size: 1.15rem;
  font-weight: 700;
}
.results-title p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.reset-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
}
.reset-btn:hover {
  border-color: var(--border-light);
  color: var(--text-primary);
  background: rgba(255,255,255,0.04);
}

/* Best pick banner */
.best-pick-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  background: linear-gradient(135deg, rgba(16,185,129,0.12), rgba(6,182,212,0.08));
  border: 1px solid rgba(16,185,129,0.3);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}
.best-pick-icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(251,191,36,0.15);
  border: 1px solid rgba(251,191,36,0.3);
  border-radius: var(--radius-sm);
  font-size: 1.1rem;
  color: #fbbf24;
  flex-shrink: 0;
}
.best-pick-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.best-pick-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--success);
}
.best-pick-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
}
.best-pick-savings {
  margin-left: auto;
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.best-pick-savings span {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.best-pick-savings strong {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--success);
}

/* Summary cards */
.summary-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.summary-card {
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
}
.summary-card .sc-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.summary-card .sc-value {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
}
.summary-card .sc-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 3px;
}

/* Comparison table */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  margin-bottom: 20px;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.compare-table thead th {
  background: var(--bg-card-2);
  padding: 13px 16px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}

.compare-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.compare-table tbody tr:last-child { border-bottom: none; }
.compare-table tbody tr:hover { background: rgba(255,255,255,0.03); }
.compare-table tbody tr.best-row {
  background: rgba(16,185,129,0.05);
  border-color: rgba(16,185,129,0.15);
}

.compare-table tbody td {
  padding: 14px 16px;
  vertical-align: middle;
  color: var(--text-primary);
}

/* Provider cell */
.provider-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}
.provider-icon {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  flex-shrink: 0;
}
.provider-name { font-weight: 700; font-size: 0.9rem; }
.best-badge {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  background: rgba(251,191,36,0.15);
  border: 1px solid rgba(251,191,36,0.3);
  color: #fbbf24;
  border-radius: 99px;
}

/* Fee cell */
.fee-cell { font-weight: 700; color: var(--danger); }
.fee-cell.fee-best { color: var(--success); }

/* Delivery cell */
.delivery-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  white-space: nowrap;
}
.delivery-cell i { font-size: 0.8rem; }
.delivery-fast i { color: var(--success); }
.delivery-medium i { color: var(--warning); }
.delivery-slow i { color: var(--text-muted); }

/* Stars */
.stars { color: #fbbf24; font-size: 0.75rem; letter-spacing: 1px; }

/* Mobile provider cards */
.provider-cards-mobile { display: none; }

.pcard {
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 12px;
  transition: all var(--transition);
}
.pcard.pcard-best {
  background: rgba(16,185,129,0.06);
  border-color: rgba(16,185,129,0.25);
}

.pcard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.pcard-provider {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pcard-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.pcard-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.pcard-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.pcard-val {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
}
.pcard-val.val-danger { color: var(--danger); }
.pcard-val.val-success { color: var(--success); }

/* Disclaimer */
.results-disclaimer {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  gap: 8px;
  line-height: 1.5;
}
.results-disclaimer i { color: var(--accent); flex-shrink: 0; margin-top: 1px; }

/* ── Tips section ── */
.tips-section {
  padding: 80px 0;
  background: rgba(255,255,255,0.015);
  border-top: 1px solid var(--border);
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.tip-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: all 0.3s ease;
}
.tip-card:hover {
  border-color: var(--border-light);
  transform: translateY(-3px);
}

.tip-icon {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(79,70,229,0.12);
  border: 1px solid rgba(79,70,229,0.22);
  border-radius: var(--radius-sm);
  color: var(--primary-light);
  font-size: 1.1rem;
  margin-bottom: 16px;
}
.tip-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.tip-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ── Responsive ── */
@media (max-width: 1100px) {
  .calc-layout { grid-template-columns: 340px 1fr; }
  .tips-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .calc-layout { grid-template-columns: 1fr; }
  .calc-panel { position: static; }
  .summary-cards { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 700px) {
  .table-wrap { display: none; }
  .provider-cards-mobile { display: block; }
  .summary-cards { grid-template-columns: 1fr 1fr; }
  .tips-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .results-content { padding: 20px 16px; }
  .best-pick-banner { flex-wrap: wrap; }
  .best-pick-savings { margin-left: 0; text-align: left; }
  .summary-cards { grid-template-columns: 1fr; }
}
