/**
 * Crypto Ticker styles.
 *
 * @since      1.0.0
 * @package    AA_Toolkit
 * @subpackage AA_Toolkit/public/css
 * @author     freeTree4
 * @updated    2025-05-30 20:25:30 by freeTree4
 */

/* Ticker container */
.aa-crypto-ticker-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #1d2330;
    color: #ffffff;
    z-index: 999999;
    overflow: hidden;
    height: 40px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Push down site content when admin bar is present */
.admin-bar .aa-crypto-ticker-wrapper {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar .aa-crypto-ticker-wrapper {
        top: 46px;
    }
}

/* Ticker animation container */
.aa-crypto-ticker {
    display: flex;
    align-items: center;
    height: 40px;
    white-space: nowrap;
}

/* Ticker animation */
@keyframes ticker-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Individual ticker items */
.aa-crypto-ticker-item {
    display: inline-flex;
    align-items: center;
    padding: 0 15px;
    height: 40px;
    text-decoration: none;
    color: #ffffff;
    transition: background-color 0.2s ease;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    margin-right: 15px; /* Space between coins */
}

.aa-crypto-ticker-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* Last item should not have right margin to avoid extra space */
.aa-crypto-ticker-item:last-child {
    margin-right: 0;
}

/* Crypto icon */
.aa-crypto-ticker-icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    border-radius: 50%;
}

/* Crypto symbol */
.aa-crypto-ticker-symbol {
    font-weight: bold;
    margin-right: 8px;
    text-transform: uppercase; /* Ensure uppercase */
}

/* Crypto price */
.aa-crypto-ticker-price {
    margin-right: 8px;
    font-family: monospace;
    font-weight: 500;
}

/* Price change indicator */
.aa-crypto-ticker-change {
    font-weight: bold;
    padding: 0 6px;
    border-radius: 3px;
}

.aa-crypto-ticker-change.positive {
    color: #00c853;
    background-color: rgba(0, 200, 83, 0.1);
}

.aa-crypto-ticker-change.negative {
    color: #ff3d00;
    background-color: rgba(255, 61, 0, 0.1);
}

/* Animation settings */
.aa-crypto-ticker {
    animation: ticker-scroll 30s linear infinite;
}

/* Pause animation on hover */
.aa-crypto-ticker:hover {
    animation-play-state: paused;
}

/* Responsive adjustments */
@media screen and (max-width: 600px) {
    .aa-crypto-ticker-item {
        padding: 0 10px;
        margin-right: 10px; /* Slightly less space on mobile */
    }

    .aa-crypto-ticker-icon {
        width: 16px;
        height: 16px;
        margin-right: 4px;
    }

    .aa-crypto-ticker-symbol {
        margin-right: 4px;
    }

    .aa-crypto-ticker-price {
        font-size: 12px;
    }

    .aa-crypto-ticker-change {
        font-size: 11px;
        padding: 0 4px;
    }
}

/* High resolution displays */
@media screen and (min-width: 1200px) {
    .aa-crypto-ticker-item {
        padding: 0 20px;
        margin-right: 20px; /* More space on larger screens */
    }

    .aa-crypto-ticker-icon {
        width: 24px;
        height: 24px;
        margin-right: 10px;
    }

    .aa-crypto-ticker-symbol {
        margin-right: 10px;
        font-size: 15px;
    }

    .aa-crypto-ticker-price {
        margin-right: 10px;
        font-size: 15px;
    }

    .aa-crypto-ticker-change {
        padding: 2px 8px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .aa-crypto-ticker-wrapper {
        background-color: #121721;
    }

    .aa-crypto-ticker-item {
        border-right-color: rgba(255, 255, 255, 0.05);
    }

    .aa-crypto-ticker-change.positive {
        background-color: rgba(0, 200, 83, 0.15);
    }

    .aa-crypto-ticker-change.negative {
        background-color: rgba(255, 61, 0, 0.15);
    }
}