/* Import Shared Layout & Component Styles */
@import url('../templates/css/header.css');
@import url('../user/themes/modigin/css/custom.css');
@import url('../templates/css/layout.css');
@import url('../components/css/date-picker.css');

/* Harry Page Specific Styles */

/* Current Value Display */

.current-value {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.value-price {
    font-size: 3rem;
    font-weight: bold;
}

.value-change {
    font-size: 1.25rem;
    font-weight: 600;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #6b7280;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Chart Styles */

.chart-container {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.chart-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1f2937;
}

#fredChart {
    max-height: 400px;
}

.info-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.info-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1f2937;
}

.info-text {
    line-height: 1.6;
    color: #4b5563;
}

/* Enhanced Data Table Styles */

/* Enhanced Data Table Styles */
.data-table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.data-table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.data-table-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.data-table-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.data-table-search {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    width: 200px;
    background: #f9fafb;
    color: #374151;
}

.data-table-search:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.download-btn {
    padding: 0.5rem 1rem;
    background: #059669;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.875rem;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.download-btn:hover {
    background: #047857;
}

.data-table-wrapper {
    overflow-x: auto;
    position: relative;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.data-table th {
    background: #f8fafc;
    color: #374151;
    font-weight: 600;
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 10;
}

.data-table th:first-child {
    padding-left: 2rem;
}

.data-table th:last-child {
    padding-right: 2rem;
}

.data-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    color: #1f2937;
}

.data-table td:first-child {
    padding-left: 2rem;
    font-weight: 500;
}

.data-table td:last-child {
    padding-right: 2rem;
}

.data-table tbody tr:hover {
    background: #f9fafb;
}

.data-table tbody tr:nth-child(even) {
    background: #fafbfc;
}

.data-table tbody tr:nth-child(even):hover {
    background: #f3f4f6;
}

/* Numeric column styling */
.data-table .numeric {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
}

/* Date column styling */
.data-table .date {
    color: #6b7280;
    font-size: 0.8125rem;
}

/* Value trend indicators */
.trend-up {
    color: #10b981;
    font-weight: 600;
}

.trend-down {
    color: #ef4444;
    font-weight: 600;
}

.trend-neutral {
    color: #6b7280;
}

/* Pagination controls */
.table-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    border-top: 1px solid #e5e7eb;
    background: #fafbfc;
}

.pagination-info {
    color: #6b7280;
    font-size: 0.875rem;
}

.pagination-controls {
    display: flex;
    gap: 0.5rem;
}

.pagination-btn {
    padding: 0.375rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    color: #374151;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

/* Loading state */
.data-table-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    color: #6b7280;
}

.loading-spinner {
    width: 1.5rem;
    height: 1.5rem;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive design */
@media (max-width: 768px) {
    .value-price { 
        font-size: 2.5rem; 
    }
    
    .stats-grid { 
        grid-template-columns: repeat(2, 1fr); 
    }
    
    .data-table-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .data-table-controls {
        justify-content: space-between;
    }
    
    .data-table-search {
        width: 100%;
        max-width: 200px;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.5rem;
    }
    
    .data-table th:first-child,
    .data-table td:first-child {
        padding-left: 1rem;
    }
    
    .data-table th:last-child,
    .data-table td:last-child {
        padding-right: 1rem;
    }
    
    .table-pagination {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
}