/* ============================================
   BCV CALCULATOR MODAL
   Currency exchange calculator for Venezuela
   ============================================ */

.bcv-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: none;
  align-items: flex-start;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-base);
  padding: 40px 20px;
  overflow-y: auto;
}

.bcv-overlay.active {
  display: flex;
  opacity: 1;
}

.bcv-container {
  background: #1a1a1a;
  border: 1px solid rgba(46, 204, 113, 0.3);
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  padding: 40px 35px;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.bcv-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.6);
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.bcv-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-color: rgba(255, 255, 255, 0.3);
}

.bcv-header {
  text-align: center;
  margin-bottom: 32px;
}

.bcv-title {
  font-size: 26px;
  font-weight: 700;
  color: #2ecc71;
  margin-bottom: 8px;
}

.bcv-subtitle {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--mono);
}

/* Current Rates Display */
.bcv-rates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 32px;
}

.bcv-rates.bcv-rates-3 {
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.bcv-rate-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(46, 204, 113, 0.2);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  text-align: center;
}

.bcv-rate-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  font-family: var(--mono);
  margin-bottom: 8px;
  text-transform: uppercase;
}

/* Live indicator for real-time USDT */
.live-indicator {
  color: #2ecc71;
  font-size: 8px;
  animation: pulse-live 1.5s ease-in-out infinite;
  vertical-align: middle;
  margin-left: 4px;
}

@keyframes pulse-live {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.bcv-rate-value {
  font-size: 24px;
  font-weight: 700;
  color: #2ecc71;
  font-family: var(--mono);
}

.bcv-rate-symbol {
  font-size: 48px;
  margin-bottom: 10px;
  opacity: 1;
  font-weight: bold;
  color: #2ecc71;
  text-shadow: 0 0 20px rgba(46, 204, 113, 0.4);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* USDT specific styling */
.bcv-rate-usdt .bcv-rate-symbol {
  color: #26a17b;
  text-shadow: 0 0 20px rgba(38, 161, 123, 0.4);
}

.bcv-rate-usdt {
  border-color: rgba(38, 161, 123, 0.3);
}

.bcv-rate-usdt .bcv-rate-value {
  color: #26a17b;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.1s ease;
}

.bcv-rate-usdt .bcv-rate-value:hover {
  color: #2ecc71;
}

.bcv-rate-usdt .bcv-rate-value:active {
  transform: scale(0.98);
}

/* Calculator */
.bcv-calculator {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  margin-bottom: 20px;
}

.bcv-calc-title {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 24px;
  font-family: var(--mono);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.bcv-input-group {
  margin-bottom: 18px;
}

.bcv-input-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--mono);
  margin-bottom: 8px;
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.bcv-input-wrapper {
  display: flex;
  gap: 12px;
  align-items: center;
}

.bcv-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 18px;
  font-family: var(--mono);
  color: white;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.bcv-input:focus {
  outline: none;
  border-color: rgba(46, 204, 113, 0.5);
  background: rgba(255, 255, 255, 0.08);
}

.bcv-select {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 15px;
  font-family: var(--mono);
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  min-width: 100px;
}

.bcv-select:focus {
  outline: none;
  border-color: rgba(46, 204, 113, 0.5);
}

.bcv-select option {
  background: #1a1a1a;
  color: white;
}

.bcv-swap-icon {
  text-align: center;
  font-size: 24px;
  color: rgba(255, 255, 255, 0.4);
  margin: 8px 0;
}

.bcv-result {
  background: rgba(46, 204, 113, 0.08);
  border: 1px solid rgba(46, 204, 113, 0.2);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  text-align: center;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.bcv-result-text {
  font-size: 28px;
  font-weight: 700;
  color: #2ecc71;
  font-family: var(--mono);
}

.bcv-result-empty {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.3);
  font-family: var(--mono);
  font-style: italic;
}

.bcv-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(46, 204, 113, 0.3);
  border-radius: var(--radius-sm);
  color: #2ecc71;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--mono);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.bcv-copy-btn:hover {
  background: rgba(46, 204, 113, 0.1);
  border-color: rgba(46, 204, 113, 0.5);
  transform: translateY(-1px);
}

.bcv-copy-btn svg {
  width: 14px;
  height: 14px;
}

/* Update Info */
.bcv-update-info {
  text-align: center;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
  font-family: var(--mono);
  margin-top: 20px;
}

body.bcv-open {
  overflow: hidden;
}

/* Desktop - center when enough space */
@media (min-height: 700px) {
  .bcv-overlay {
    align-items: center;
    padding: 20px;
  }
}

/* Large desktop */
@media (min-width: 769px) {
  .bcv-rates.bcv-rates-3 .bcv-rate-card {
    padding: 16px 12px;
  }

  .bcv-rates.bcv-rates-3 .bcv-rate-symbol {
    font-size: 40px;
  }

  .bcv-rates.bcv-rates-3 .bcv-rate-value {
    font-size: 20px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .bcv-overlay {
    padding: 10px;
    align-items: flex-start;
    padding-top: 20px;
  }

  .bcv-container {
    padding: 32px 20px;
    max-width: 100%;
  }

  .bcv-title {
    font-size: 22px;
  }

  .bcv-rates {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .bcv-rates.bcv-rates-3 {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .bcv-rates.bcv-rates-3 .bcv-rate-card {
    padding: 12px 8px;
  }

  .bcv-rates.bcv-rates-3 .bcv-rate-symbol {
    font-size: 28px;
    margin-bottom: 6px;
  }

  .bcv-rates.bcv-rates-3 .bcv-rate-label {
    font-size: 9px;
  }

  .bcv-rates.bcv-rates-3 .bcv-rate-value {
    font-size: 14px;
  }

  .bcv-rate-card {
    padding: 16px 12px;
  }

  .bcv-rate-symbol {
    font-size: 44px;
  }

  .bcv-rate-value {
    font-size: 20px;
  }

  .bcv-calculator {
    padding: 24px 20px;
  }

  .bcv-input {
    font-size: 16px;
    padding: 12px 14px;
  }

  .bcv-select {
    font-size: 14px;
    padding: 12px 14px;
    min-width: 85px;
  }

  .bcv-result {
    padding: 20px 16px;
  }

  .bcv-result-text {
    font-size: 22px;
  }
}

/* ============================================
   HISTORY SECTION
   ============================================ */
.bcv-history {
  margin-top: 24px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 16px;
}

.bcv-history-header {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
  text-align: center;
}

.bcv-history-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bcv-history-item {
  display: grid;
  grid-template-columns: 1fr 1fr 60px;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
  font-family: var(--mono);
  font-size: 12px;
  align-items: center;
}

.bcv-history-item.current {
  background: rgba(46, 204, 113, 0.1);
  border: 1px solid rgba(46, 204, 113, 0.2);
}

.bcv-history-date {
  color: rgba(255, 255, 255, 0.5);
}

.bcv-history-rate {
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
}

.bcv-history-var {
  text-align: right;
  font-weight: 600;
}

.bcv-history-var.up {
  color: #e74c3c;
}

.bcv-history-var.down {
  color: #2ecc71;
}

.bcv-history-var.neutral {
  color: rgba(255, 255, 255, 0.3);
}

.bcv-history-empty {
  text-align: center;
  color: rgba(255, 255, 255, 0.3);
  font-size: 12px;
  font-family: var(--mono);
  padding: 8px;
}

/* Mobile history styles */
@media (max-width: 768px) {
  .bcv-history {
    padding: 12px;
    margin-top: 16px;
  }

  .bcv-history-item {
    padding: 6px 10px;
    font-size: 11px;
    grid-template-columns: 1fr 1fr 50px;
  }

  .bcv-history-header {
    font-size: 11px;
    margin-bottom: 10px;
  }
}
