/**
 * Goldbusters Ticker Frontend Styles
 *
 * NetDynamic
 * Version: 1.0.0
 */

/* Container */
.gb-ticker-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0;
    background: transparent;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
}

/* Header */
.gb-ticker-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #d4af37;
}

.gb-ticker-header h3 {
    color: #d4af37;
    font-size: 32px;
    margin: 0 0 10px 0;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.gb-ticker-tagline {
    color: #4a7c59;
    font-size: 18px;
    margin: 0;
    font-weight: 500;
}

/* Grid Layout */
.gb-ticker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 15px;
    margin: 0;
}

/* Price Cards */
.gb-ticker-card {
    background: linear-gradient(135deg, #2d5016 0%, #4a7c59 100%);
    border: 2px solid #d4af37;
    border-radius: 10px;
    padding: 18px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: visible;
}

.gb-ticker-card:hover,
.gb-ticker-card.card-hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.4);
    border-color: #f4cf47;
}

/* Card Header */
.gb-ticker-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(212, 175, 55, 0.3);
}

.gb-ticker-emoji {
    font-size: 28px;
    line-height: 1;
}

.gb-ticker-metal-name {
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Price Display */
.gb-ticker-price {
    text-align: center;
    margin: 12px 0;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Sparkline Background */
.gb-ticker-sparkline-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
}

.gb-ticker-sparkline-bg svg {
    width: 100%;
    height: 100%;
}

.gb-ticker-price-wrapper {
    display: flex;
    align-items: baseline;
    gap: 3px;
    line-height: 1;
    position: relative;
    z-index: 1;
}

.gb-ticker-currency {
    color: #d4af37;
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
}

.gb-ticker-amount {
    color: #ffffff;
    font-size: 36px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1;
}

.gb-ticker-unit {
    display: block;
    color: #cccccc;
    font-size: 11px;
    margin-top: 6px;
    font-style: italic;
    position: relative;
    z-index: 1;
}

/* Card Info */
.gb-ticker-card-info {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid rgba(212, 175, 55, 0.3);
}

.gb-ticker-items {
    color: #ffffff;
    font-size: 14px;
    margin-bottom: 10px;
}

.gb-ticker-items strong {
    color: #d4af37;
}

.gb-ticker-value {
    color: #e0e0e0;
    font-size: 13px;
    font-style: italic;
}

/* Live Status Indicator */
.gb-ticker-live-status {
    text-align: center;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.gb-ticker-live-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #0f0;
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
    opacity: 0.8;
}

.gb-ticker-live-indicator.pulse {
    animation: pulse-animation 1s ease-out;
}

@keyframes pulse-animation {
    0% {
        opacity: 0.8;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.4);
        box-shadow: 0 0 15px rgba(0, 255, 0, 0.8);
    }
    100% {
        opacity: 0.8;
        transform: scale(1);
    }
}

.gb-ticker-live-text {
    color: #0f0;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.3);
}

/* Price Change Indicator */
.gb-ticker-change {
    display: none;
    font-size: 13px;
    font-weight: 600;
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
}

.gb-ticker-change.change-up {
    color: #0f0;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
}

.gb-ticker-change.change-down {
    color: #f00;
    text-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
}

/* Price Flash Effect - Subtle border glow only */
.gb-ticker-price.price-flash-up {
    animation: flash-up 0.6s ease-out;
}

.gb-ticker-price.price-flash-down {
    animation: flash-down 0.6s ease-out;
}

@keyframes flash-up {
    0% { box-shadow: none; }
    50% {
        box-shadow: 0 0 10px rgba(0, 255, 0, 0.3) inset;
    }
    100% { box-shadow: none; }
}

@keyframes flash-down {
    0% { box-shadow: none; }
    50% {
        box-shadow: 0 0 10px rgba(255, 0, 0, 0.3) inset;
    }
    100% { box-shadow: none; }
}

/* Footer Section */
.gb-ticker-footer {
    padding-top: 30px;
    border-top: 2px solid #d4af37;
}

.gb-ticker-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.gb-ticker-highlight {
    text-align: center;
    padding: 15px;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.gb-ticker-highlight strong {
    display: block;
    color: #d4af37;
    font-size: 16px;
    margin-bottom: 8px;
}

.gb-ticker-highlight p {
    color: #cccccc;
    font-size: 14px;
    margin: 0;
}

/* Call to Action */
.gb-ticker-cta {
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.gb-ticker-button {
    display: inline-block;
    padding: 15px 30px;
    background: linear-gradient(135deg, #d4af37 0%, #f4cf47 100%);
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.gb-ticker-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(212, 175, 55, 0.5);
    color: #000000;
}

.gb-ticker-button-secondary {
    background: linear-gradient(135deg, #2d5016 0%, #4a7c59 100%);
    color: #ffffff;
    border: 2px solid #d4af37;
}

.gb-ticker-button-secondary:hover {
    background: linear-gradient(135deg, #4a7c59 0%, #2d5016 100%);
    color: #ffffff;
}

/* Notice Styles */
.gb-ticker-notice {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    padding: 30px;
    text-align: center;
}

.gb-ticker-notice-content h4 {
    color: #d4af37;
    font-size: 24px;
    margin: 0 0 15px 0;
}

.gb-ticker-notice-content p {
    color: #cccccc;
    font-size: 16px;
    margin: 10px 0;
}

.gb-ticker-notice-content a {
    color: #4a7c59;
    text-decoration: underline;
}

.gb-ticker-notice-content a:hover {
    color: #d4af37;
}

/* Responsive Design */
@media (max-width: 768px) {
    .gb-ticker-container {
        padding: 0;
        margin: 10px auto;
        max-width: 500px;
    }

    .gb-ticker-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    /* Compact mobile layout - all cards in one container */
    .gb-ticker-card {
        border-radius: 0;
        border-bottom: 1px solid #d4af37;
        padding: 15px;
    }

    .gb-ticker-card:first-child {
        border-radius: 10px 10px 0 0;
        border-top: 2px solid #d4af37;
    }

    .gb-ticker-card:last-child {
        border-radius: 0 0 10px 10px;
        border-bottom: 2px solid #d4af37;
    }

    .gb-ticker-card-header {
        margin-bottom: 10px;
        padding-bottom: 8px;
    }

    .gb-ticker-price {
        min-height: 80px;
        margin: 10px 0;
        padding: 10px;
    }

    .gb-ticker-amount {
        font-size: 30px;
    }

    .gb-ticker-currency {
        font-size: 20px;
    }

    .gb-ticker-emoji {
        font-size: 24px;
    }

    .gb-ticker-metal-name {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .gb-ticker-container {
        max-width: 100%;
        margin: 5px;
    }

    /* Ultra-compact mobile view */
    .gb-ticker-card {
        padding: 12px;
    }

    .gb-ticker-card-header {
        flex-direction: row;
        gap: 6px;
    }

    .gb-ticker-emoji {
        font-size: 20px;
    }

    .gb-ticker-metal-name {
        font-size: 16px;
    }

    .gb-ticker-price {
        min-height: 70px;
        padding: 8px;
    }

    .gb-ticker-amount {
        font-size: 26px;
    }

    .gb-ticker-currency {
        font-size: 18px;
    }

    .gb-ticker-unit {
        font-size: 10px;
    }

    .gb-ticker-live-status {
        padding-top: 6px;
        margin-top: 8px;
    }

    .gb-ticker-live-text {
        font-size: 9px;
    }

    .gb-ticker-live-indicator {
        width: 6px;
        height: 6px;
    }
}

/* Widget Specific Styles */
.widget .gb-ticker-container {
    margin: 0;
    padding: 20px;
}

.widget .gb-ticker-header h3 {
    font-size: 20px;
}

.widget .gb-ticker-grid {
    grid-template-columns: 1fr;
}

/* Print Styles */
@media print {
    .gb-ticker-container {
        border: 1px solid #000;
        box-shadow: none;
    }

    .gb-ticker-button {
        display: none;
    }
}
