/**
* EDGE STATES & ERROR HANDLING
* Empty states, error pages, and edge case handling
* 2025/2026 Complete Edge State Design
*/

/* ============================================
  EMPTY STATES
  ============================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    max-width: 500px;
    margin: 0 auto;
}

.empty-state-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 30px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #667eea;
}

.empty-state-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-color);
}

.empty-state-description {
    font-size: 1rem;
    color: var(--text-color-light);
    margin-bottom: 30px;
    line-height: 1.6;
}

.empty-state-action {
    display: inline-block;
    margin-top: 20px;
}

/* ============================================
  ERROR STATES
  ============================================ */
.error-state {
    text-align: center;
    padding: 80px 20px;
    max-width: 600px;
    margin: 0 auto;
}

.error-state-code {
    font-size: 8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 20px;
}

.error-state-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-color);
}

.error-state-description {
    font-size: 1.1rem;
    color: var(--text-color-light);
    margin-bottom: 40px;
    line-height: 1.6;
}

.error-state-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
  LOADING STATES
  ============================================ */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    min-height: 300px;
}

.loading-state-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(102, 126, 234, 0.2);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loading-state-text {
    color: var(--text-color-light);
    font-size: 1rem;
}

/* ============================================
  OFFLINE STATE
  ============================================ */
.offline-state {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #f59e0b;
    color: white;
    padding: 12px 20px;
    text-align: center;
    z-index: 10000;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.offline-state.active {
    transform: translateY(0);
}

.offline-state-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* ============================================
  PERMISSION DENIED
  ============================================ */
.permission-denied {
    text-align: center;
    padding: 60px 20px;
    max-width: 500px;
    margin: 0 auto;
}

.permission-denied-icon {
    font-size: 4rem;
    color: #ef4444;
    margin-bottom: 20px;
}

.permission-denied-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-color);
}

.permission-denied-description {
    color: var(--text-color-light);
    margin-bottom: 30px;
}

/* ============================================
  NO RESULTS
  ============================================ */
.no-results {
    text-align: center;
    padding: 60px 20px;
}

.no-results-icon {
    font-size: 4rem;
    color: var(--text-color-light);
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-results-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-color);
}

.no-results-description {
    color: var(--text-color-light);
    margin-bottom: 30px;
}

.no-results-suggestions {
    text-align: left;
    max-width: 400px;
    margin: 0 auto;
}

.no-results-suggestions h4 {
    font-size: 1rem;
    margin-bottom: 12px;
    color: var(--text-color);
}

.no-results-suggestions ul {
    list-style: none;
    padding: 0;
}

.no-results-suggestions li {
    padding: 8px 0;
    color: var(--text-color-light);
}

.no-results-suggestions li::before {
    content: '•';
    color: #667eea;
    margin-right: 8px;
}

/* ============================================
  SUCCESS STATES
  ============================================ */
.success-state {
    text-align: center;
    padding: 60px 20px;
    max-width: 500px;
    margin: 0 auto;
}

.success-state-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 30px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    animation: scale-in 0.5s ease;
}

.success-state-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-color);
}

.success-state-description {
    color: var(--text-color-light);
    margin-bottom: 30px;
}

/* ============================================
  PARTIAL SUCCESS
  ============================================ */
.partial-success {
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.partial-success-title {
    font-weight: 600;
    color: #92400e;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.partial-success-description {
    color: #78350f;
    font-size: 0.95rem;
}

/* ============================================
  TIMEOUT STATE
  ============================================ */
.timeout-state {
    text-align: center;
    padding: 60px 20px;
}

.timeout-state-icon {
    font-size: 4rem;
    color: #f59e0b;
    margin-bottom: 20px;
}

.timeout-state-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-color);
}

.timeout-state-description {
    color: var(--text-color-light);
    margin-bottom: 30px;
}

/* ============================================
  NETWORK ERROR
  ============================================ */
.network-error {
    text-align: center;
    padding: 60px 20px;
    max-width: 500px;
    margin: 0 auto;
}

.network-error-icon {
    font-size: 4rem;
    color: #ef4444;
    margin-bottom: 20px;
}

.network-error-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-color);
}

.network-error-description {
    color: var(--text-color-light);
    margin-bottom: 30px;
}

.network-error-retry {
    margin-top: 20px;
}

/* ============================================
  ANIMATIONS
  ============================================ */
@keyframes scale-in {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ============================================
  RESPONSIVE DESIGN
  ============================================ */
@media (max-width: 768px) {
    .error-state-code {
        font-size: 5rem;
    }

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

    .empty-state-icon,
    .success-state-icon {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
}

/* ============================================
  ACCESSIBILITY
  ============================================ */
@media (prefers-reduced-motion: reduce) {
    .loading-state-spinner,
    .success-state-icon {
        animation: none;
    }
}


/* Focus styles for accessibility - Auto-added */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}
