/**
 * CoinRemark Compact Price Widget Styles
 * Responsive design for sidebars and archive pages
 */

.coinremark-compact-widget {
    background: #ffffff;
    border: 1px solid #e5e7eb;
}

/* Image */
.coinremark-compact-list .coinremark-compact-item img{
    width:30px;
    height:30px;
}

/* Coinremark compact change */
.coinremark-compact-list .coinremark-compact-item .coinremark-compact-change{
    font-family:'Cascadia Mono';
}

/* Bottom border divider between coin items */
.coinremark-compact-list .coinremark-compact-item{
    border-bottom: 1px solid #e5e7eb;
}

/* Remove border from last item */
.coinremark-compact-list .coinremark-compact-item:last-child{
    border-bottom: none;
}

/* Metrics container */
.coinremark-compact-metrics{
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 8px;
    font-size: 12px;
}

/* Individual metric */
.coinremark-compact-metric{
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Metric labels */
.coinremark-compact-metric .metric-label{
    color: #6b7280;
    font-weight: 500;
}

/* Metric values */
.coinremark-compact-metric .metric-value{
    font-family: 'Cascadia Mono';
    font-weight: 600;
    color: #374151;
}

/* Coinremark compact symbol */
.coinremark-compact-list .coinremark-compact-item .coinremark-compact-symbol{
    font-family:'Hanken';
}

/* Coinremark compact change */
.coinremark-compact-list .coinremark-compact-item .coinremark-compact-change{
    font-family:'Cascadia Mono';
    padding: 9px;
    margin-bottom: 20px;
    max-width: 100%;
    font-weight: 400;
}

/* Header */
.coinremark-compact-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f3f4f6;
}

.coinremark-compact-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

.coinremark-compact-refresh {
    cursor: pointer;
    color: #6b7280;
    transition: color 0.2s ease;
}

.coinremark-compact-refresh:hover {
    color: #3b82f6;
    background-color: #f3f4f6;
}

.coinremark-compact-refresh.loading {
    animation: coinremark-spin 1s linear infinite;
}

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

/* List */
.coinremark-compact-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.coinremark-compact-item {
    display: flex;
    align-items: flex-start;
    padding: 8px;
    transition: background-color 0.2s ease;
}

.coinremark-compact-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 8px;
    margin-top: 2px;
    flex-shrink: 0;
}

.coinremark-compact-info {
    flex: 1;
    min-width: 0;
}

.coinremark-compact-symbol {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 2px;
}

.coinremark-compact-price {
    font-size: 16px;
    color: #6b7280;
    font-weight: 700;
}

.coinremark-compact-marketcap {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
    margin-top: 8px;
}

.coinremark-compact-change24h {
    font-size: 12px;
    color: #059669;
    font-weight: 500;
}

.coinremark-compact-change {
    font-size: 12px;
    min-width: 50px;
    text-align: center;
}

.coinremark-compact-change.positive {
    color: #059669;
    background-color: #d1fae5;
}

.coinremark-compact-change.negative {
    color: #dc2626;
    background-color: #fee2e2;
}

/* Change arrow icons */
.coinremark-compact-change .change-arrow {
    margin-right: 4px;
    font-size: 10px;
    font-weight: bold;
}

/* Footer */
.coinremark-compact-footer {
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid #f3f4f6;
    text-align: center;
}

.coinremark-compact-footer small {
    color: #9ca3af;
    font-size: 11px;
}

.coinremark-compact-time {
    font-weight: 500;
}

/* Dark Theme */
.coinremark-compact-dark {
    background: #1f2937;
    border-color: #374151;
    color: #f9fafb;
}

.coinremark-compact-dark .coinremark-compact-header {
    border-bottom-color: #374151;
}

.coinremark-compact-dark .coinremark-compact-title {
    color: #f9fafb;
}

.coinremark-compact-dark .coinremark-compact-refresh {
    color: #9ca3af;
}

.coinremark-compact-dark .coinremark-compact-refresh:hover {
    color: #60a5fa;
    background-color: #374151;
}

.coinremark-compact-dark .coinremark-compact-item:hover {
    background-color: #374151;
}

.coinremark-compact-dark .coinremark-compact-symbol {
    color: #f9fafb;
}

.coinremark-compact-dark .coinremark-compact-price {
    color: #d1d5db;
}

.coinremark-compact-dark .coinremark-compact-footer {
    border-top-color: #374151;
}

.coinremark-compact-dark .coinremark-compact-footer small {
    color: #9ca3af;
}

/* Error State */
.coinremark-compact-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 12px;
    border-radius: 6px;
    text-align: center;
    font-size: 14px;
}

/* Loading State */
.coinremark-compact-loading {
    opacity: 0.6;
    pointer-events: none;
}

.coinremark-compact-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: coinremark-skeleton 1.5s infinite;
}

@keyframes coinremark-skeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.coinremark-compact-skeleton .coinremark-compact-symbol,
.coinremark-compact-skeleton .coinremark-compact-price,
.coinremark-compact-skeleton .coinremark-compact-change {
    background: #e5e7eb;
    color: transparent;
    border-radius: 4px;
}

.darkmode--activated .coinremark-compact-widget{
	background-color: transparent;
}

.darkmode--activated .coinremark-compact-list .coinremark-compact-item .coinremark-compact-symbol{
	color: var(--alt-dark);
}

.darkmode--activated .coinremark-compact-list .coinremark-compact-item .coinremark-compact-marketcap{
	color: var(--alt-dark);
}

.darkmode--activated .coinremark-compact-list .coinremark-compact-item .coinremark-compact-change24h{
	color: var(--main-branding);
}

.darkmode--activated .coinremark-compact-list .coinremark-compact-item .coinremark-compact-price{
	color: var(--alt-dark);
}

/* Coinremark compact header */
 .coinremark-compact-header{
	padding:15px;
	font-size:23px;
}

.coinremark-compact-widget .coinremark-compact-list .coinremark-compact-item{
	background-color:transparent;
}

/* Coinremark compact price */
.coinremark-compact-list .coinremark-compact-item .coinremark-compact-price{
	color:#020202;
}




/* Responsive Design */
@media (max-width: 768px) {
    .coinremark-compact-widget {
        padding: 12px;
    }
    
    .coinremark-compact-title {
        font-size: 14px;
    }
    
    .coinremark-compact-icon {
        width: 20px;
        height: 20px;
    }
    
    .coinremark-compact-symbol {
        font-size: 13px;
    }
    
    .coinremark-compact-price {
        font-size: 11px;
    }
    
    .coinremark-compact-change {
        font-size: 11px;
        min-width: 45px;
    }
}

/* Compact Mode for Very Small Spaces */
.coinremark-compact-mini .coinremark-compact-item {
    padding: 4px 8px;
}

.coinremark-compact-mini .coinremark-compact-icon {
    width: 18px;
    height: 18px;
}

.coinremark-compact-mini .coinremark-compact-symbol {
    font-size: 12px;
}

.coinremark-compact-mini .coinremark-compact-price {
    font-size: 10px;
}

.coinremark-compact-mini .coinremark-compact-change {
    font-size: 10px;
    min-width: 40px;
}

/* Widget in Sidebar */
.widget .coinremark-compact-widget {
    margin-bottom: 0;
}

/* Integration with Popular Themes */
.sidebar .coinremark-compact-widget,
.widget-area .coinremark-compact-widget {
    background: var(--widget-bg, #ffffff);
    border-color: var(--widget-border, #e5e7eb);
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .coinremark-compact-widget {
        border-width: 2px;
    }
    
    .coinremark-compact-change.positive {
        background-color: #22c55e;
        color: #ffffff;
    }
    
    .coinremark-compact-change.negative {
        background-color: #ef4444;
        color: #ffffff;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .coinremark-compact-refresh,
    .coinremark-compact-item {
        transition: none;
    }
    
    .coinremark-compact-refresh.loading {
        animation: none;
    }
    
    .coinremark-compact-skeleton {
        animation: none;
        background: #f0f0f0;
    }
}