/* Custom styles for the enhanced Google Sheets visualization */

/* Card and container styles */
.card {
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.table-container {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 #f7fafc;
}

.table-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.table-container::-webkit-scrollbar-track {
    background: #f7fafc;
}

.table-container::-webkit-scrollbar-thumb {
    background-color: #cbd5e0;
    border-radius: 4px;
}

/* Table row hover effect */
#data-rows tr {
    transition: background-color 0.2s;
}

#data-rows tr:hover {
    background-color: rgba(236, 244, 251, 0.9) !important;
}

/* Header sorting indicators */
th[data-sorted="asc"] .fa-sort::before {
    content: "\f0de";
    color: #4299e1;
}

th[data-sorted="desc"] .fa-sort::before {
    content: "\f0dd";
    color: #4299e1;
}

/* Loading overlay */
.loading-overlay {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(2px);
    transition: opacity 0.3s ease;
}

/* Animation for the refresh icon */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spin-animation {
    animation: spin 1s linear infinite;
}

/* Button animations */
.btn-effect {
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}

.btn-effect:after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: -100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: all 0.3s;
}

.btn-effect:hover:after {
    left: 100%;
}

/* Tooltip styles */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 120px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Chart containers */
.chart-container {
    min-height: 300px;
    position: relative;
}

/* Progress bar styling */
.progress-bar {
    height: 8px;
    border-radius: 4px;
    background-color: #e2e8f0;
    overflow: hidden;
}

.progress-bar-inner {
    height: 100%;
    background-color: #4299e1;
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* Toggle switch styles */
#auto-refresh-toggle {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transition: .4s;
}

#auto-refresh-toggle:checked {
    transform: translateX(100%);
    background-color: #4299e1;
}

#auto-refresh-toggle:checked + label {
    background-color: #bee3f8;
}

#auto-refresh-toggle:focus + label {
    box-shadow: 0 0 1px #4299e1;
}

#auto-refresh-toggle + label {
    transition: .4s;
}

/* Print-specific styles */
@media print {
    body {
        font-size: 10pt;
    }
    
    .no-print {
        display: none !important;
    }
    
    .table-container {
        overflow: visible !important;
    }
    
    table {
        width: 100% !important;
        page-break-inside: auto;
    }
    
    tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }
    
    thead {
        display: table-header-group;
    }
    
    tfoot {
        display: table-footer-group;
    }
}
