:root {
    --mud-palette-primary: #FF7F38 !important;
    --mud-palette-error: #F04438 !important;
}




#blazor-error-ui {
    background: lightyellow;
    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;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

/* Global Action Icon Styling */
.action-icon-style {
    width: 40px;
    height: 40px;
}

/* Fallback CSS Custom Properties for MudBlazor Theme Colors */
:root {
    --mud-palette-tertiary: #2E8BC0;
    --mud-palette-tertiary-text: #FFFFFF;
    --mud-palette-tertiary-darken: #1976D2;
    --mud-palette-primary: #00426D;
    --mud-palette-secondary: #FF7F38;
    --mud-palette-secondary-rgb: 255, 127, 56;
}

/* Remove default top padding from MudMainContent since we don't have an app bar when authenticated */
@media (min-width: 600px) {
    .mud-main-content {
        padding-top: 0 !important;
    }
}

/* Also remove for smaller screens */
.mud-main-content {
    padding-top: 0 !important;
}

/* Global image styling fixes */
.mud-image {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

    /* Fix for broken image alt text display */
    .mud-image img {
        background: transparent !important;
    }

    /* Ensure alt text doesn't have blue background */
    .mud-image:not(.mud-image-loaded) {
        background: transparent !important;
        color: var(--mud-palette-text-secondary) !important;
        border: 1px dashed var(--mud-palette-lines-default, #e0e0e0) !important;
        border-radius: 4px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 12px !important;
        padding: 8px !important;
    }

/* Custom MudTabs styling - Secondary color underline for active tab */
.mud-tabs .mud-tab.mud-tab-active {
    background-color: transparent !important;
    text-transform: none !important; /* Prevent tab text capitalization */
}

    .mud-tabs .mud-tab.mud-tab-active::after {
        background-color: #FF7F38 !important; /* Color.Secondary */
        height: 3px !important;
    }

.mud-tabs .mud-tab::after {
    background-color: transparent !important;
    height: 3px !important;
    transition: background-color 0.3s ease !important;
}

.mud-tabs .mud-tab:hover::after {
    background-color: rgba(255, 127, 56, 0.5) !important; /* Color.Secondary with transparency */
}

/* Ensure tab text color remains readable and not capitalized */
.mud-tabs .mud-tab {
    color: var(--mud-palette-text-primary) !important;
    text-transform: none !important; /* Prevent tab text capitalization */
}

    .mud-tabs .mud-tab.mud-tab-active {
        color: #FF7F38 !important; /* Color.Secondary for active tab text */
        font-weight: 600 !important;
        text-transform: none !important; /* Prevent active tab text capitalization */
    }

/* Override MudButton text transformation - prevent uppercase */
.mud-button {
    text-transform: none !important;
}

    /* Ensure button text is not capitalized */
    .mud-button .mud-button-label {
        text-transform: none !important;
    }

/* Override MudTabPanel text transformation - prevent uppercase */
.mud-tab-panel {
    text-transform: none !important;
}

/* Prevent text transformation in tab headers */
.mud-tabs .mud-tab-header {
    text-transform: none !important;
}

/* Ensure all tab-related elements don't have text transformation */
.mud-tabs .mud-tab-content {
    text-transform: none !important;
}

/* Additional safety for all tab elements */
.mud-tabs * {
    text-transform: none !important;
}

/* Authentication layout specific styles */
.authenticated-layout {
    margin-left: 280px;
}


/*Classified Landing */

.Landing-ImageUpload-Container {
    padding: 60px;
    min-width: 300px;
    min-height: 100%;
    border: solid black 1px;
}

.classified-modal {
    padding: 30px;
}

.mud-dialog-title {
    text-align: center;
    text-transform:capitalize;
}
/*Classiffied / Stores */
.cover-upload-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    flex-direction: column;
}

.cover-upload-box {
    position: relative;
    width: 100%; /* fixed width to match both default and image */
    height: 174px;
    border: 1px solid #D0D5DD;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    overflow: hidden;
    border-radius: 8px;
    background-color: white;
}

.cover-image-preview {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.cover-logo-overlay {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 36px;
    background-color: #000000CC;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    z-index: 10;
}



/*Classified Stores styling */
/* //CompanyLogo.razor    */

.company-logo-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 240px;
    padding: 10px;
    border: 2px dashed black;
}

.section-title {
    font-family: 'Public Sans', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: var(--color-text-heading);
    margin-bottom: 16px;
    text-align: center;
}

.upload-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.upload-box {
    height: 240px;
    width: 240px;
    border: 2px dashed #ccc;
    cursor: pointer;
    position: relative;
    padding: 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: white;
}

.logo-image {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.logo-overlay {
    width: 240px;
    height: 22px;
    background-color: #000000CC;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    bottom: 0;
    z-index: 10;
}

.logo-action {
    color: white;
    padding: 0;
}

.upload-placeholder {
    width: 64px;
    height: 64px;
    background-color: var(--color-background-secondary-grey-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-icon {
    height: 24px;
}

.upload-text {
    margin-top: 8px;
    color: var(--color-accent);
    font-size: 13px;
    font-weight: 500;
}

.recommendation-text {
    margin-top: 0.5rem;
    color: var(--color-text-descripton);
    max-width: 180px;
    text-align: center;
    font-weight: 400;
    font-size: 12px;
}

/* Image upload grid for classifieds/service photos */
.image-grid {
 display: flex;
 flex-wrap: wrap;
 gap:12px;
 align-items: flex-start;
}

.item-upload-box {
 width:120px;
 height:120px;
 position: relative;
 border:1px dashed #E6E6E6;
 border-radius:6px;
 overflow: hidden;
 background-color: #ffffff;
 display: flex;
 align-items: center;
 justify-content: center;
}

.item-upload-box.add-more-box {
 cursor: pointer;
}

.item-upload-box { cursor: default; }

.upload-label {
 display: block;
 position: relative;
 width:100%;
 height:100%;
}

.upload-content {
 display: flex;
 flex-direction: column;
 align-items: center;
 justify-content: center;
 height:100%;
 padding:8px;
}

.upload-icon-box {
 width:44px;
 height:44px;
 border-radius:6px;
 display: flex;
 align-items: center;
 justify-content: center;
 background-color: #F6F7F9;
}

.item-upload-icon {
 font-size:22px;
 color: var(--mud-palette-primary);
}

.preview-image {
 width:100%;
 height:100%;
 object-fit: cover;
 display: block;
}

.delete-icon {
 position: absolute;
 top:6px;
 right:6px;
 z-index:40;
 background: rgba(255,255,255,0.85);
 border-radius:50%;
}

.cover-photo-label {
 position: absolute;
 bottom:6px;
 left:6px;
 background-color: var(--mud-palette-secondary, #FF7F38);
 color: #fff;
 padding:4px 6px;
 font-size:12px;
 border-radius:4px;
 z-index:35;
}

.category-filter-select {
    min-width: 180px !important;
    width: 200px !important;
}

    .category-filter-select .mud-input-root {
        width: 100% !important;
    }
/* Root row when expanded */
.category-root-row .mud-table-cell {
    background-color: rgba(0, 0, 0, 0.03);
    font-weight: 500;
}

/* Direct children */
.category-child-l1 .mud-table-cell {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Grandchildren & deeper */
.category-child-l2 .mud-table-cell {
    background-color: rgba(0, 0, 0, 0.015);
}

/* Optional: unified hover look */
.category-root-row:hover .mud-table-cell,
.category-child-l1:hover .mud-table-cell,
.category-child-l2:hover .mud-table-cell {
    background-color: rgba(0, 0, 0, 0.05);
}


/* Root row when expanded */
.mud-table-row.category-root-row > .mud-table-cell {
    background-color: rgba(0, 0, 0, 0.03) !important;
    font-weight: 500;
}

/* Direct children */
.mud-table-row.category-child-l1 > .mud-table-cell {
    background-color: rgba(0, 0, 0, 0.02) !important;
}

/* Grandchildren & deeper */
.mud-table-row.category-child-l2 > .mud-table-cell {
    background-color: rgba(0, 0, 0, 0.015) !important;
}

/* Optional: unified hover look */
.mud-table-row.category-root-row:hover > .mud-table-cell,
.mud-table-row.category-child-l1:hover > .mud-table-cell,
.mud-table-row.category-child-l2:hover > .mud-table-cell {
    background-color: rgba(0, 0, 0, 0.05) !important;
}

/* ROOT category (L0) */
.cat-expanded-root {
    background-color: rgba(33, 150, 243, 0.12); /* MudBlazor primary-ish blue */
    border-left: 4px solid #2196f3;
    font-weight: 600;
}

/* Level 1 children */
.cat-expanded-l1 {
    background-color: rgba(0, 150, 136, 0.10); /* teal */
    border-left: 4px solid #009688;
}

/* Level 2+ children */
.cat-expanded-l2 {
    background-color: rgba(0, 0, 0, 0.04);
    border-left: 4px solid rgba(0, 0, 0, 0.25);
}

    .cat-expanded-root:hover,
    .cat-expanded-l1:hover,
    .cat-expanded-l2:hover {
        background-color: rgba(0, 0, 0, 0.08);
    }


.cat-expanded-root,
.cat-expanded-l1 {
    box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.02);
}


.mud-table-row {
    transition: background-color 120ms ease-in-out;
}



@media (max-width:768px) {
 .item-upload-box { width:96px; height:96px; }
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
    .authenticated-layout {
        margin-left: 0;
    }

    .sidebar-full-height {
        width: 100% !important;
        z-index: 1300 !important;
    }
}
