@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes plus {
    0% {
        background-color: #ebebeb;
    }

    50% {
        background-color: #dbdbdb;
    }

    100% {
        background-color: #cbcbcb;
    }
}


/* Loading Component Styles */
.table-loading-wrapper {
    position: relative;
}

/* Skeleton loading styles */
.skeleton {
    background-color: #ebebeb;
    animation: plus 1.5s infinite ease-in-out;
    border-radius: 4px;
    box-sizing: border-box;
    min-width: 100px;
}

.skeleton-header {
    height: 35px;
    width: 75%;
    min-width: 100px;
    box-sizing: border-box;
}

.skeleton-cell {
    height: 35px;
    width: 100%;
    margin: 4px 0;
    box-sizing: border-box;
}

.skeleton-column {
    height: 150px;
}

.panel-loading-wrapper {
    position: relative;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    margin-top: 1rem;
    color: #666;
    font-size: 0.9rem;
}

/* Progress bar styles */
.progress-bar {
    /*height: 4px;*/
    /*background-color: #007bff;*/
    transition: width 0.3s ease;
    /*opacity: 0;*/
}

    .progress-bar.opacity-0 {
        opacity: 0;
    }

/* Loading overlay */
    .loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay .loading-spinner {
    width: 60px;
    height: 60px;
    border-width: 6px;
}

/* Designed Empty States — standalone card */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    background: #ffffff;
    border-radius: 12px;
    border: 1px dashed #dee2e6;
    margin: 1.5rem auto;
    width: 100%;
    max-width: 650px;
}
.empty-state-icon i {
    font-size: 3.5rem;
    color: #6c757d;
}
.empty-state-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #212529;
}
.empty-state-message {
    font-size: 0.9rem;
    color: #6c757d;
}

/* Grid-connected sibling empty state — attaches below the AG Grid header row */
[id$="GridEmptyState"], [id$="KanBanEmptyState"] {
    border: 1px solid var(--pcl-surface-border, #dee2e6);
    border-top: none;
    border-radius: 0 0 var(--pcl-radius-control, 8px) var(--pcl-radius-control, 8px);
    background: #fff;
    overflow: hidden;
}
[id$="GridEmptyState"] .empty-state,
[id$="KanBanEmptyState"] .empty-state {
    border: none;
    border-radius: 0;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
}

/* Designed Load Error States */
.error-state {
    text-align: center;
    padding: 3.5rem 1.5rem;
    background: #fffcfc;
    border-radius: 12px;
    border: 1px solid #f8d7da;
    margin: 1.5rem 0;
}
.error-state-icon i {
    font-size: 3.5rem;
    color: #dc3545;
}
.error-state-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #842029;
}
.error-state-message {
    font-size: 0.95rem;
    color: #842029;
}

/* Form Validation Styling */
.form-error-msg {
    font-size: 0.825rem;
    font-weight: 500;
    color: #dc3545 !important;
    margin-top: 0.25rem;
}
.is-invalid {
    border-color: #dc3545 !important;
}

/* Conflict Diff Modal */
.conflict-diff-panel {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
}
.conflict-diff-panel h6 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.75rem;
}
.conflict-diff-table-wrapper {
    overflow-x: auto;
}
.conflict-diff-table-wrapper table {
    margin-bottom: 0;
    font-size: 0.85rem;
}
.conflict-diff-table-wrapper th {
    background: #f1f5f9;
    color: #475569;
    font-weight: 600;
}
.conflict-diff-table-wrapper td {
    vertical-align: middle;
}

/* Dashboard chart loading */
.dashboard-panel-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    padding: 2rem 1rem;
}

.is-loading {
    pointer-events: none;
}

.oa-charts-grid.is-loading .kp-content,
.oa-charts-grid.is-loading .vendor-panel-view {
    opacity: 0.55;
}

.rd-kpi-strip.is-loading .rc-stat-value,
.rd-kpi-strip.is-loading .rc-stat-subtitle,
#vendorOverviewKpis.is-loading .rc-stat-value,
#vendorOverviewKpis.is-loading .rc-stat-subtitle {
    opacity: 1;
}

.kp-chart.is-loading,
.kp-chart:has(> .dashboard-panel-loading) {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.vendor-dashboard-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2rem;
}