/* ==========================================================================
   Empty States CSS - US-079
   Styles for empty state components
   ========================================================================== */

/* Base Empty State Container */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 2rem;
    min-height: 200px;
}

/* Size Variants */
.empty-state-sm {
    padding: 1.5rem 1rem;
    min-height: 120px;
}

.empty-state-sm .empty-state-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.empty-state-sm .empty-state-title {
    font-size: 1rem;
}

.empty-state-sm .empty-state-message {
    font-size: 0.875rem;
}

.empty-state-md {
    padding: 3rem 2rem;
    min-height: 250px;
}

.empty-state-lg {
    padding: 4rem 3rem;
    min-height: 350px;
}

.empty-state-lg .empty-state-icon {
    font-size: 5rem;
    margin-bottom: 1.5rem;
}

.empty-state-lg .empty-state-title {
    font-size: 1.5rem;
}

.empty-state-lg .empty-state-message {
    font-size: 1.125rem;
}

/* Icon Styles — Apple subtle, no animation */
.empty-state-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    opacity: 0.6;
}

.empty-state-icon svg {
    width: 2.5rem;
    height: 2.5rem;
}

.empty-state-lg .empty-state-icon svg {
    width: 3.5rem;
    height: 3.5rem;
}

.empty-state-sm .empty-state-icon svg {
    width: 1.75rem;
    height: 1.75rem;
}

/* Title — Apple H3 hierarchy */
.empty-state-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--dp-text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.005em;
    line-height: 1.35;
}

/* Message */
.empty-state-message {
    font-size: 0.9375rem;
    color: var(--dp-text-secondary);
    max-width: 400px;
    margin-bottom: 1.5rem;
    line-height: 1.55;
}

/* Custom Content */
.empty-state-content {
    margin-bottom: 1.5rem;
    width: 100%;
    max-width: 400px;
}

/* Actions */
.empty-state-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* Help Link */
.empty-state-help {
    margin-top: 1.5rem;
}

.empty-state-help a {
    color: var(--dp-text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.empty-state-help a:hover {
    color: var(--dp-interactive-primary);
}

/* Search Term Display */
.search-term-display {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.search-term-display code {
    background-color: var(--dp-surface-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.9em;
}

/* Suggestions List */
.suggestions {
    text-align: left;
    max-width: 300px;
}

.suggestions ul li {
    padding: 0.25rem 0;
}

/* Error Details */
.error-details {
    max-width: 400px;
    width: 100%;
}

.error-details summary {
    cursor: pointer;
    user-select: none;
}

.error-details summary:hover {
    color: var(--dp-interactive-primary) !important;
}

.error-details pre {
    max-height: 150px;
    overflow-y: auto;
    font-size: 0.75rem;
    text-align: left;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Error Code */
.error-code code {
    background-color: var(--dp-status-danger-bg);
    color: var(--dp-status-danger);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

/* Card Integration */
.card .empty-state {
    border-radius: inherit;
}

.card-body .empty-state {
    padding: 2rem 1rem;
}

/* Table Integration — Apple shadow-only (no border, table provides separator) */
.table-responsive .empty-state,
table + .empty-state {
    border: none;
    border-top: 1px solid var(--dp-border-subtle);
    border-radius: 0;
}

/* ==========================================================================
   Illustrated Empty States (optional illustrations)
   ========================================================================== */

.empty-state-illustrated {
    padding-top: 2rem;
}

.empty-state-illustration {
    width: 200px;
    height: 150px;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.empty-state-lg .empty-state-illustration {
    width: 280px;
    height: 200px;
}

.empty-state-sm .empty-state-illustration {
    width: 120px;
    height: 90px;
}

/* ==========================================================================
   Specific Empty State Types
   ========================================================================== */

/* Type-specific icon tints (Apple HIG: muted decorative, semantic only on Error)
   Most types delegate to the .text-muted Bootstrap class set in Razor.
   Only Error keeps semantic danger color. */

.empty-state[data-type="error"] .empty-state-icon {
    color: var(--dp-status-danger);
    opacity: 0.85;
}

/* Removed: colored backgrounds on error/success types (Apple HIG — let
   the parent card carry the surface; empty state stays neutral).
   Removed: maintenance rotate + coming-soon rocket animations (decorative
   motion violates Apple HIG for non-functional elements). */

/* ==========================================================================
   Dark Mode Support
   ========================================================================== */

.dark-mode .empty-state-title {
    color: var(--dp-text-primary);
}

.dark-mode .empty-state-message {
    color: var(--dp-text-secondary);
}

.dark-mode .search-term-display code {
    background-color: var(--dp-surface-primary);
    color: var(--dp-text-primary);
}

.dark-mode .error-details pre {
    background-color: var(--dp-surface-primary) !important;
    color: var(--dp-text-secondary);
}

.dark-mode .error-code code {
    background-color: var(--dp-status-danger-bg);
    color: var(--dp-status-danger);
}

.dark-mode .empty-state[data-type="error"] {
    background-color: var(--dp-status-danger-bg);
}

.dark-mode .empty-state[data-type="success"] {
    background-color: var(--dp-status-success-bg);
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media (max-width: 576px) {
    .empty-state {
        padding: 2rem 1rem;
    }
    
    .empty-state-icon {
        font-size: 3rem;
    }
    
    .empty-state-title {
        font-size: 1.1rem;
    }
    
    .empty-state-message {
        font-size: 0.9rem;
    }
    
    .empty-state-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .empty-state-actions .btn {
        width: 100%;
        margin-left: 0 !important;
        margin-top: 0.5rem;
    }
    
    .empty-state-actions .btn:first-child {
        margin-top: 0;
    }
    
    .empty-state-lg {
        padding: 3rem 1.5rem;
    }
    
    .empty-state-lg .empty-state-icon {
        font-size: 4rem;
    }
}
