/**
 * JGP Widgets — Price change badges + Multi-currency calculator
 */

/* ════════════════ Price Change Badges ════════════════ */
.jgp-pcb {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-radius: 10px;
  padding: 18px 24px;
  margin: 0 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.jgp-pcb::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, #d4af37, #f5c645, #d4af37);
}
.jgp-pcb-main { display: flex; flex-direction: column; gap: 4px; min-width: 180px; }
.jgp-pcb-label {
  font-size: 11px; color: #d4af37; text-transform: uppercase;
  letter-spacing: 0.5px; font-weight: 600;
}
.jgp-pcb-value {
  font-size: 28px; font-weight: 800; color: #fff;
  letter-spacing: -0.5px; line-height: 1;
  display: flex; align-items: baseline; gap: 8px;
}
.jgp-pcb-unit { font-size: 14px; color: #888; font-weight: 500; }
.jgp-pcb-live {
  font-size: 10px; font-weight: 700;
  background: rgba(76,175,80,0.2); color: #66bb6a;
  padding: 3px 7px; border-radius: 8px;
  border: 1px solid rgba(76,175,80,0.4);
  text-transform: uppercase; letter-spacing: 0.5px;
  animation: jgpPcbBlink 2s infinite;
}
@keyframes jgpPcbBlink { 0%,100% {opacity:1;} 50% {opacity:0.5;} }

.jgp-pcb-changes {
  display: flex; gap: 12px; flex: 1; justify-content: flex-end; flex-wrap: wrap;
}
.jgp-pcb-change {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 10px 14px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  min-width: 90px;
}
.jgp-pcb-change-label {
  font-size: 10px; color: #b0b8c5;
  text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600;
}
.jgp-pcb-change-value {
  font-size: 16px; font-weight: 800;
}
.jgp-pcb-change-abs { font-size: 10px; color: #888; }
.jgp-pcb-change--up   .jgp-pcb-change-value { color: #66bb6a; }
.jgp-pcb-change--down .jgp-pcb-change-value { color: #ef5350; }
.jgp-pcb-change--up   { border-color: rgba(76,175,80,0.3); }
.jgp-pcb-change--down { border-color: rgba(244,67,54,0.3); }

@media (max-width: 600px) {
  .jgp-pcb { padding: 14px 16px; }
  .jgp-pcb-value { font-size: 22px; }
  .jgp-pcb-changes { width: 100%; gap: 6px; }
  .jgp-pcb-change { padding: 8px 10px; min-width: 80px; flex: 1; }
  .jgp-pcb-change-value { font-size: 14px; }
}

/* ════════════════ Calculator ════════════════ */
.jgp-calc-outer-title {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 48px 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #d4af37;
}

.jgp-calc {
  background: linear-gradient(135deg, #fff4d1 0%, #fff9e3 50%, #fef0c4 100%);
  border: 1px solid #e0c97a;
  border-radius: 12px;
  padding: 24px 26px;
  margin: 0 0 32px;
  position: relative;
  box-shadow: 0 2px 10px rgba(212,175,55,0.12);
}
.jgp-calc::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #b8860b, #d4af37, #f5c645, #d4af37, #b8860b);
}
.jgp-calc-desc {
  font-size: 13px; color: #666; line-height: 1.7; margin: 0 0 20px;
}

.jgp-calc-input {
  display: grid; grid-template-columns: 2fr 1.5fr; gap: 14px;
  background: #fff; border-radius: 8px; padding: 16px 18px;
  margin-bottom: 18px; border: 1px solid #e8dec0;
}
.jgp-calc-input-row { display: flex; flex-direction: column; gap: 6px; }
.jgp-calc-input-row label {
  font-size: 11px; color: #888; text-transform: uppercase;
  letter-spacing: 0.5px; font-weight: 600;
}
.jgp-calc-input-row input,
.jgp-calc-input-row select {
  font-size: 18px; font-weight: 700; color: #1a1a2e;
  padding: 10px 12px; border: 2px solid #e8dec0; border-radius: 6px;
  background: #fff; outline: none; width: 100%;
  font-family: inherit;
}
.jgp-calc-input-row input:focus,
.jgp-calc-input-row select:focus { border-color: #d4af37; }

.jgp-calc-results {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px;
  margin-bottom: 14px;
}
.jgp-calc-result {
  background: #fff; border: 1px solid #e8dec0; border-radius: 8px;
  padding: 14px 12px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  transition: transform 0.2s, border-color 0.2s;
}
.jgp-calc-result:hover { transform: translateY(-2px); border-color: #d4af37; }
.jgp-calc-result--main {
  background: linear-gradient(135deg,#fff8e1,#fef9e0);
  border: 2px solid #d4af37;
}
.jgp-calc-flag { font-size: 18px; }
.jgp-calc-curr {
  font-size: 11px; color: #888; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.jgp-calc-amount {
  font-size: 16px; font-weight: 800; color: #b8860b;
  letter-spacing: -0.3px; word-break: break-all;
}
.jgp-calc-result--main .jgp-calc-amount { color: #1a1a2e; }

.jgp-calc-footer {
  background: rgba(255,255,255,0.5); border-radius: 6px;
  padding: 8px 12px;
}
.jgp-calc-rates {
  font-size: 11px; color: #856b25; line-height: 1.7;
}

@media (max-width: 700px) {
  .jgp-calc-results { grid-template-columns: repeat(2, 1fr); }
  .jgp-calc-amount { font-size: 14px; }
}
@media (max-width: 400px) {
  .jgp-calc-input { grid-template-columns: 1fr; }
}
