/* PlaneSales Seller Portal - App Styles */

/* Global adjustments for MudBlazor */
:root {
    --mud-palette-primary: #1976D2;
    --mud-palette-secondary: #FF6F00;
}

/* Ensure body takes full height */
html, body {
    min-height: 100vh;
    margin: 0;
    font-family: 'Roboto', sans-serif;
}

/* Fix for Blazor error UI */
#blazor-error-ui {
    background: #d32f2f;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    color: white;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* Card hover effect */
.cursor-pointer {
    cursor: pointer;
}

.cursor-pointer:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease-in-out;
}

/* Text truncation helper */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Border primary class for selected items */
.border-primary {
    border-color: var(--mud-palette-primary) !important;
    border-width: 2px !important;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .mud-appbar {
        padding: 0 8px;
    }

    .mud-drawer {
        width: 280px !important;
    }
}

/* Print styles */
@media print {
    .mud-appbar,
    .mud-drawer,
    .mud-navmenu {
        display: none !important;
    }

    .mud-main-content {
        margin: 0 !important;
        padding: 0 !important;
    }
}

/* Step indicator — uniform numbered bubbles, no tick flip */
.step-indicator {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin-bottom: 1.5rem;
    padding: 0;
    list-style: none;
}

.step-indicator__step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}

.step-indicator__step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20px;
    left: calc(50% + 20px);
    right: calc(-50% + 20px);
    height: 2px;
    background: #e0e0e0;
    z-index: 0;
}

.step-indicator__step--completed::after {
    background: var(--mud-palette-primary);
}

.step-indicator__bubble {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    z-index: 1;
    position: relative;
    border: 2px solid #bdbdbd;
    background: #fff;
    color: #757575;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.step-indicator__step--completed .step-indicator__bubble {
    background: #e8f5e9;
    border-color: var(--mud-palette-primary);
    color: var(--mud-palette-primary);
}

.step-indicator__step--active .step-indicator__bubble {
    background: var(--mud-palette-primary);
    border-color: var(--mud-palette-primary);
    color: #fff;
}

.step-indicator__label {
    margin-top: 6px;
    font-size: 0.75rem;
    text-align: center;
    color: #757575;
    max-width: 80px;
    line-height: 1.2;
}

.step-indicator__step--active .step-indicator__label {
    color: var(--mud-palette-primary);
    font-weight: 600;
}

.step-indicator__step--completed .step-indicator__label {
    color: var(--mud-palette-primary);
}

.step-indicator__step--clickable {
    cursor: pointer;
}

.step-indicator__step--clickable:hover .step-indicator__bubble {
    background: var(--mud-palette-primary);
    border-color: var(--mud-palette-primary);
    color: #fff;
}

@media (max-width: 600px) {
    .step-indicator__label {
        display: none;
    }

    .step-indicator__bubble {
        width: 32px;
        height: 32px;
        font-size: 0.875rem;
    }

    .step-indicator__step:not(:last-child)::after {
        top: 16px;
        left: calc(50% + 16px);
        right: calc(-50% + 16px);
    }
}

/* Hide MudStepper's own header bubbles on create pages — our StepIndicator replaces them */
.ps-create-stepper .mud-stepper-header {
    display: none !important;
}
