/**
 * Dashboard specific styles
 * Additional styling for the marketing insights dashboard
 *
 * @package TopPraktijk_Dashboard
 */

/* Chart container sizing */
.tp-chart-container {
    position: relative;
    height: 350px;
}

/* Enhanced stat cards */
.tp-stat__icon .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Section icons */
.tp-section__title-icon.dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    color: var(--tp-primary);
}

/* Button icons */
.tp-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Select icon spacing */
.tp-select {
    background-size: 12px;
}

/* Table improvements */
.tp-table {
    border-radius: var(--tp-radius-sm);
    overflow: hidden;
}

.tp-table th:first-child {
    border-top-left-radius: var(--tp-radius-sm);
}

.tp-table th:last-child {
    border-top-right-radius: var(--tp-radius-sm);
}

.tp-table tfoot tr:last-child td:first-child {
    border-bottom-left-radius: var(--tp-radius-sm);
}

.tp-table tfoot tr:last-child td:last-child {
    border-bottom-right-radius: var(--tp-radius-sm);
}

/* Hero section icon */
.tp-hero__date-badge .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

/* Error icon sizing */
.tp-error__icon.dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

/* Loading spinner animation enhancement */
@keyframes tp-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.tp-loading__spinner {
    will-change: transform;
}

/* Card shadow enhancement */
.tp-card {
    position: relative;
}

.tp-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--tp-primary) 0%, var(--tp-primary-light) 100%);
    border-radius: var(--tp-radius) var(--tp-radius) 0 0;
}

/* Responsive chart */
@media (max-width: 768px) {
    .tp-chart-container {
        height: 250px;
        padding: 16px;
    }
}

/* Print styles for dashboard */
@media print {
    .tp-site-header,
    .tp-site-footer,
    .tp-card__header button,
    .tp-card__header select {
        display: none !important;
    }
    
    .tp-card {
        box-shadow: none !important;
        border: 1px solid #ddd;
    }
    
    .tp-hero {
        page-break-inside: avoid;
    }
    
    .tp-section {
        page-break-inside: avoid;
    }
}

/* Animation for data updates */
@keyframes tp-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.tp-loading .tp-stat__value,
.tp-loading #tp-total-conversions {
    animation: tp-pulse 1.5s ease-in-out infinite;
}

/* Custom scrollbar for tables */
.tp-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tp-table-wrapper::-webkit-scrollbar {
    height: 8px;
}

.tp-table-wrapper::-webkit-scrollbar-track {
    background: var(--tp-cream-dark);
    border-radius: 4px;
}

.tp-table-wrapper::-webkit-scrollbar-thumb {
    background: var(--tp-primary-light);
    border-radius: 4px;
}

.tp-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--tp-primary);
}

/* Focus states for accessibility */
.tp-btn:focus,
.tp-select:focus {
    outline: 2px solid var(--tp-primary);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .tp-card {
        border: 2px solid var(--tp-text-dark);
    }
    
    .tp-stat {
        border: 1px solid var(--tp-border);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .tp-card,
    .tp-stat,
    .tp-btn,
    .tp-progress__fill {
        animation: none !important;
        transition: none !important;
    }
}
