/* Price Ticker Styles */

/* Price Ticker Header - Bottom Right Corner Widget */
.price-ticker-header {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, rgba(6, 208, 231, 0.15), rgba(6, 208, 231, 0.08));
    border: 1px solid rgba(6, 208, 231, 0.4);
    border-radius: 12px;
    padding: 1rem;
    max-width: 280px;
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.price-ticker-header.show {
    display: block;
}

.price-ticker-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(6, 208, 231, 0.1), transparent);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

.price-ticker-content {
    position: relative;
    z-index: 1;
}

.price-ticker-info {
    text-align: center;
    margin-bottom: 1rem;
}

.price-ticker-title {
    font-size: 1.4rem;
    font-weight: var(--fontWeights-bold);
    color: var(--colors-azure);
    margin: 0 0 0.3rem 0;
}

.price-ticker-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

/* Compact Price Display */
.price-display {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    padding: 0.8rem;
    transition: all 0.3s ease;
}

.price-item:hover {
    background: rgba(0, 0, 0, 0.4);
    transform: scale(1.02);
}

.price-token {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    font-weight: var(--fontWeights-bold);
    color: var(--colors-base);
}

.price-token-icon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--colors-azure), var(--colors-yellow));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    flex-shrink: 0;
}

.price-info {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.price-value {
    font-size: 1.3rem;
    font-weight: var(--fontWeights-bold);
    color: var(--colors-base);
    margin: 0;
    transition: all 0.3s ease;
    line-height: 1;
}

.price-value.updating {
    color: var(--colors-azure);
    transform: scale(1.05);
}

/* Special styling for very small prices */
.price-value.small-price {
    font-size: 1.1rem;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.3px;
}

.price-value.scientific-notation {
    font-size: 1.2rem;
    font-family: 'Courier New', monospace;
}

.price-change {
    font-size: 1rem;
    font-weight: var(--fontWeights-medium);
    margin: 0;
    transition: all 0.3s ease;
    line-height: 1;
}

.price-change.positive {
    color: var(--colors-green);
}

.price-change.negative {
    color: var(--colors-danger);
}

.price-change.neutral {
    color: rgba(255, 255, 255, 0.6);
}

/* Portfolio Overview */
.portfolio-overview {
    display: none;
    background: linear-gradient(135deg, rgba(0, 227, 124, 0.1), rgba(0, 227, 124, 0.05));
    border: 1px solid rgba(0, 227, 124, 0.3);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.portfolio-overview.show {
    display: block;
}

.portfolio-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.portfolio-title {
    font-size: 2rem;
    font-weight: var(--fontWeights-bold);
    color: var(--colors-green);
    margin: 0;
}

.portfolio-total {
    font-size: 2.4rem;
    font-weight: var(--fontWeights-bold);
    color: var(--colors-base);
    margin: 0;
}

.portfolio-refresh {
    background: rgba(0, 227, 124, 0.2);
    border: 1px solid var(--colors-green);
    color: var(--colors-green);
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.portfolio-refresh:hover {
    background: rgba(0, 227, 124, 0.3);
    transform: translateY(-1px);
}

.portfolio-breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.portfolio-token {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
}

.portfolio-token-name {
    font-size: 1.4rem;
    font-weight: var(--fontWeights-bold);
    color: var(--colors-base);
    margin: 0 0 1rem 0;
}

.portfolio-token-amount {
    font-size: 1.8rem;
    font-weight: var(--fontWeights-bold);
    color: var(--colors-azure);
    margin: 0 0 0.5rem 0;
}

.portfolio-token-value {
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

/* Price Ticker Controls - Compact */
.price-ticker-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.price-ticker-status {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
}

.price-ticker-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--colors-green);
    animation: pulse 2s ease-in-out infinite;
}

.price-ticker-indicator.error {
    background: var(--colors-danger);
    animation: none;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.price-refresh-btn {
    background: rgba(6, 208, 231, 0.2);
    border: 1px solid var(--colors-azure);
    color: var(--colors-azure);
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.price-refresh-btn:hover {
    background: rgba(6, 208, 231, 0.3);
    transform: scale(1.05);
}

.price-refresh-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.price-refresh-btn.loading .refresh-icon {
    animation: spin 1s linear infinite;
}

.refresh-icon {
    font-size: 1rem;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Trend Indicators */
.trend-up {
    color: var(--colors-green);
}

.trend-down {
    color: var(--colors-danger);
}

.trend-stable {
    color: rgba(255, 255, 255, 0.6);
}

/* Last Update */
.price-last-update {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    margin-top: 1rem;
}

/* Mobile Responsive - Hide on mobile */
@media (max-width: 768px) {
    .price-ticker-header {
        display: none !important;
    }
}

/* Very small screens - Also hide */
@media (max-width: 480px) {
    .price-ticker-header {
        display: none !important;
    }
}

/* Error States */
.price-error {
    background: rgba(190, 42, 42, 0.1);
    border: 1px solid var(--colors-danger);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    text-align: center;
    color: var(--colors-danger);
}

.price-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
    color: rgba(255, 255, 255, 0.7);
}

.price-loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(6, 208, 231, 0.3);
    border-top: 2px solid var(--colors-azure);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Animation Classes */
.price-update-flash {
    animation: priceFlash 0.5s ease-in-out;
}

@keyframes priceFlash {
    0%, 100% { background: transparent; }
    50% { background: rgba(6, 208, 231, 0.3); }
}

/* Close button */
.price-ticker-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.6);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    z-index: 1001;
}

.price-ticker-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
    transform: scale(1.1);
}

/* Wallet Balances Section */
.wallet-balances-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.balance-divider {
    text-align: center;
    margin-bottom: 0.8rem;
}

.balance-divider span {
    font-size: 1rem;
    font-weight: var(--fontWeights-medium);
    color: var(--colors-azure);
    background: rgba(6, 208, 231, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    border: 1px solid rgba(6, 208, 231, 0.3);
}

.balance-display {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.balance-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 227, 124, 0.1);
    border: 1px solid rgba(0, 227, 124, 0.2);
    border-radius: 6px;
    padding: 0.6rem;
    transition: all 0.3s ease;
}

.balance-item:hover {
    background: rgba(0, 227, 124, 0.15);
    transform: scale(1.02);
}

.balance-token {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 1rem;
    font-weight: var(--fontWeights-medium);
    color: var(--colors-green);
}

.balance-token-icon {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--colors-green), var(--colors-azure));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    flex-shrink: 0;
    color: white;
    font-weight: bold;
}

.balance-info {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.balance-amount {
    font-size: 1.1rem;
    font-weight: var(--fontWeights-bold);
    color: var(--colors-base);
    margin: 0;
    line-height: 1;
}

.balance-value {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    line-height: 1;
} 