/* 
 * 3-Column Karat Cards UI CSS
 * Colors: Maroon (#5A151C), Gold (#D4AF37), Highlight Gold (#F4E3A3)
 */

.gra-ui-container {
    font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #333;
    max-width: 1000px; /* Slightly wider for 3 columns */
    margin: 0 auto;
    padding: 20px 0;
}

/* Header */
.gra-header-row {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #5A151C;
}

.gra-center-header {
    text-align: center;
}

.gra-main-title {
    color: #5A151C;
    font-size: 26px;
    font-weight: 700;
    margin: 0;
    letter-spacing: 1px;
}

/* 3-Column Layout */
.gra-cards-row-3col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    align-items: stretch;
    margin-bottom: 25px;
}

@media (max-width: 768px) {
    .gra-cards-row-3col {
        grid-template-columns: 1fr;
    }
}

/* Cards */
.gra-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    border: 1px solid #f0f0f0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gra-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.gra-card-highlight {
    border: 2px solid #D4AF37;
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.2);
}

/* Card Header */
.gra-card-header {
    background-color: #5A151C;
    color: #fff;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
}

.gra-card-highlight .gra-card-header {
    background: linear-gradient(135deg, #5A151C 0%, #7d1c25 100%);
    border-bottom: 3px solid #D4AF37;
}

.gra-card-header i {
    font-size: 18px;
    color: #F4E3A3;
}

.gra-card-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Card Body */
.gra-card-body {
    padding: 25px 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Compact Rate Item */
.gra-rate-compact {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.gra-rate-compact-label {
    background-color: #5A151C;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-block;
}

.gra-card-highlight .gra-rate-compact-label {
    background-color: #D4AF37;
    color: #5A151C;
}

.gra-rate-compact-data {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.gra-rate-price {
    color: #333;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.gra-rate-trend {
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.gra-trend-up {
    color: #2E7D32;
}

.gra-trend-down {
    color: #D32F2F;
}

.gra-trend-neutral {
    color: #888;
}

.gra-divider {
    height: 1px;
    background-color: #f0f0f0;
    margin: 20px 0;
}

/* Unified Footer */
.gra-unified-footer {
    background-color: #FFF9E6;
    border: 1px solid #F4E3A3;
    border-radius: 8px;
    padding: 15px 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.gra-unified-footer i {
    color: #EBA61B;
    font-size: 16px;
}

.gra-footer-live-badge {
    background: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    color: #2E7D32;
    border: 1px solid #c8e6c9;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 10px;
}

.gra-live-dot {
    width: 8px;
    height: 8px;
    background-color: #4CAF50;
    border-radius: 50%;
    display: inline-block;
    animation: gra-pulse 1.5s infinite;
}

@keyframes gra-pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(76, 175, 80, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); }
}

/* Loaders */
.gra-skeleton-text {
    height: 28px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
    width: 100%;
    max-width: 120px;
}

.gra-skeleton-text.small {
    height: 16px;
    width: 80px;
}

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