/* ========================================
   BLAZOR ERROR UI STYLES
   ======================================== */

/* Error UI Banner */
#blazor-error-ui {
    background: linear-gradient(135deg, #fef3c7, #fbbf24);
    bottom: 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    display: none;
    left: 0;
    padding: 1rem 1.5rem;
    position: fixed;
    width: 100%;
    z-index: 1100;
    border-radius: 12px 12px 0 0;
    border-top: 2px solid #f59e0b;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Error Icon */
#blazor-error-ui .error-icon {
    font-size: 1.5rem;
    margin-right: 0.75rem;
    vertical-align: middle;
}

/* Error Message */
#blazor-error-ui .error-message {
    display: inline-block;
    vertical-align: middle;
    max-width: calc(100% - 150px);
}

/* Reconnecting Text */
#blazor-error-ui .reconnecting-text {
    display: none;
    color: #0369a1;
}

/* Error Text */
#blazor-error-ui .error-text {
    color: #d97706;
}

/* Show reconnecting text when in reconnecting state */
#blazor-error-ui[data-connection-status="reconnecting"] .reconnecting-text {
    display: inline;
}

#blazor-error-ui[data-connection-status="reconnecting"] .error-text {
    display: none;
}

/* Dismiss Button */
#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ef4444;
    transition: all 0.2s ease;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: bold;
    line-height: 1;
}

#blazor-error-ui .dismiss:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: translateY(-50%) scale(1.05);
}

/* Reload Button */
#blazor-error-ui .reload {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    margin-left: 0.75rem;
    padding: 0.35rem 0.85rem;
    border-radius: 6px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    transition: all 0.2s ease;
    display: inline-block;
    font-size: 0.9rem;
}

#blazor-error-ui .reload:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* ========================================
   LAYOUT STYLES
   ======================================== */

/* Modern Layout Base */
.modern-layout {
    min-height: 100vh;
    background: var(--gray-50);
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-top: 0;
}

.content-area {
    flex: 1;
    width: 100%;
}

.page-content {
    min-height: calc(100vh - 70px);
    display: flex;
    flex-direction: column;
}

/* ========================================
   MOBILE RESPONSIVE STYLES
   ======================================== */

@media (max-width: 860px) {
    /* Mobile bottom navigation spacing - prevents content from being hidden */
    .page-content {
        padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px));
    }
}

@media (max-width: 600px) {
    #blazor-error-ui {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    #blazor-error-ui .error-message {
        max-width: calc(100% - 100px);
    }

    #blazor-error-ui .error-icon {
        font-size: 1.2rem;
        margin-right: 0.5rem;
    }

    #blazor-error-ui .reload {
        padding: 0.25rem 0.6rem;
        font-size: 0.85rem;
    }
}
