/* dashboard.css - Place this in wwwroot/css/dashboard.css */

/* Grid Layout */
#dashboard-grid {
    min-height: 500px;
    position: relative;
}

/* Widget Styles */
.dashboard-widget {
    position: relative;
    transition: all 0.3s ease;
    cursor: move;
}

.dashboard-widget.dragging {
    opacity: 0.5;
    z-index: 1000;
    transform: scale(1.02);
}

.dashboard-widget.drag-over {
    border: 2px dashed #3B82F6;
    background-color: rgba(59, 130, 246, 0.05);
}

.widget-container {
    background: transparent;
    border: 1px solid oklch(92.8% 0.006 264.531);
    border-radius: 0.5rem;
    /*box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);*/
    overflow: hidden;
    height: 100%;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.widget-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Widget Header Controls */
.widget-header {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 10;
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.widget-container:hover .widget-header {
    opacity: 1;
}

.drag-handle {
    cursor: move;
    padding: 0.25rem;
    background-color: rgba(55, 65, 81, 0.5);
    color: white;
    border-radius: 0.25rem;
    transition: background-color 0.2s ease;
}

.drag-handle:hover {
    background-color: rgba(55, 65, 81, 0.7);
}

/* Responsive Widget Sizing */
.widget-compact .text-2xl {
    font-size: 1.5rem;
}

.widget-compact .text-sm {
    font-size: 0.75rem;
}

.widget-compact .p-6 {
    padding: 1rem;
}

/* Resize Modal */
.resize-modal {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Notification Styles */
.notification {
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
    }
    to {
        transform: translateX(0);
    }
}

/* Grid Breakpoints */
@media (max-width: 768px) {
    #dashboard-grid {
        grid-template-columns: repeat(6, 1fr) !important;
    }

    .dashboard-widget {
        grid-column: span 6 !important;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    #dashboard-grid {
        grid-template-columns: repeat(8, 1fr) !important;
    }
}

/* Chart Container Responsive */
.chart-container {
    height: 100%;
    min-height: 300px;
}

/* Table Responsive */
.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Placeholder Styles */
.placeholder {
    background-color: rgba(229, 231, 235, 0.5);
    border: 2px dashed #9CA3AF;
    border-radius: 0.5rem;
}

/* Loading States */
.widget-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background-color: #F9FAFB;
}

.widget-loading::after {
    content: "";
    width: 2rem;
    height: 2rem;
    border: 2px solid #E5E7EB;
    border-top-color: #3B82F6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Save/Reset Button Styles */
.action-button {
    transition: all 0.2s ease;
}

.action-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Widget Specific Styles */
.kpi-section {
    /*background: linear-gradient(to right, #F3F4F6, #FFFFFF);*/
}

.chart-wrapper {
    height: calc(100% - 3rem);
    padding: 1rem;
}

/* Dark Mode Support */
/*@media (prefers-color-scheme: dark) {*/
/*    .widget-container {*/
/*        background-color: #1F2937;*/
/*        color: #F3F4F6;*/
/*    }*/

/*    .dashboard-widget.drag-over {*/
/*        border-color: #60A5FA;*/
/*        background-color: rgba(96, 165, 250, 0.1);*/
/*    }*/
/*}*/