@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

* {
    font-family: "poppins" !important;
}

.content-area{
    margin-top: 120px; 
    min-height: calc(100vh - 120px);
}


.send-invoice-dialog-content {
    min-width: 32rem !important;
}




/* Mobile-specific font sizing for better mobile UX */
@media (max-width: 768px) {
    /* Reduce base font sizes on mobile - keep readable */
    body {
        font-size: 18px !important;
        line-height: 1.4 !important;
    }

    .items-table .mud-table-cell{
        padding-left: 0 !important;
        margin: 0 !important;
    }

    .items-table .mud-table-cell .d-flex{
        width: 100%
    }

    .content-area {
        margin-top: 80px;
        min-height: calc(100vh - 80px);
    }
    
    /* Reduce MudBlazor component font sizes on mobile - keep readable */
    .mud-typography-h1 {
        font-size: 1.875rem !important;
        line-height: 1.3 !important;
    }
    
    .mud-typography-h2 {
        font-size: 1.625rem !important;
        line-height: 1.3 !important;
    }
    
    .mud-typography-h3 {
        font-size: 1.375rem !important;
        line-height: 1.3 !important;
    }
    
    .mud-typography-h4 {
        font-size: 1.25rem !important;
        line-height: 1.3 !important;
    }
    
    .mud-typography-h5 {
        font-size: 1.125rem !important;
        line-height: 1.3 !important;
    }
    
    .mud-typography-h6 {
        font-size: 1rem !important;
        line-height: 1.3 !important;
    }
    
    .mud-typography-body1 {
        font-size: 1.125rem !important;
        line-height: 1.4 !important;
    }
    
    .mud-typography-body2 {
        font-size: 1rem !important;
        line-height: 1.4 !important;
    }
    
    .mud-typography-subtitle1 {
        font-size: 1.125rem !important;
        line-height: 1.3 !important;
    }
    
    .mud-typography-subtitle2 {
        font-size: 1rem !important;
        line-height: 1.3 !important;
    }
    
    /* Reduce button font sizes on mobile - keep readable */
    .mud-button {
        font-size: 1rem !important;
    }
    
    /* Reduce input field font sizes on mobile - keep readable */
    .mud-text-field .mud-input-root .mud-input-slot .mud-input,
    .mud-text-field .mud-input-root .mud-input-slot .mud-input-label,
    .mud-text-field .mud-input-root .mud-input-slot .mud-input-helper-text {
        font-size: 1rem !important;
    }
    
    /* Reduce table font sizes on mobile */
    .mud-table .mud-table-head .mud-th,
    .mud-table .mud-table-body .mud-td {
        font-size: 1rem !important;
    }
    
    /* Reduce navigation tab font sizes on mobile */
    .navigation-container .mud-button {
        font-size: 1rem !important;
        padding: 0.5rem 1rem !important;
    }
    
    /* Reduce mobile drawer font sizes */
    .mud-drawer .mud-nav-link {
        font-size: 0.8rem !important;
    }
    
    /* Reduce template card text sizes */
    .template-card .mud-text {
        font-size: 1rem !important;
    }
    
    /* Mobile form sizing - make forms more compact while keeping readable */
    .mud-text-field {
        margin-bottom: 0.75rem !important;
    }
    
    .mud-text-field .mud-input-root {
        min-height: 44px !important;
        max-height: 44px !important;
    }
    
    .mud-text-field .mud-input-root .mud-input-slot .mud-input {
        padding: 0.625rem 0.875rem !important;
        min-height: 44px !important;
        max-height: 44px !important;
        font-size: 1rem !important;
    }
    
    .mud-text-field .mud-input-root .mud-input-slot .mud-input-label {
        font-size: 1rem !important;
        transform: translateY(-0.5rem) !important;
    }
    
    .mud-text-field .mud-input-root .mud-input-slot .mud-input-label.mud-floating {
        transform: translateY(-1.25rem) scale(0.8) !important;
    }
    
    /* Reduce textarea heights on mobile - make more compact */
    .mud-input-control .mud-input-root .mud-input-slot .mud-input {
        min-height: 60px !important;
        max-height: 80px !important;
        padding: 0.625rem 0.875rem !important;
        font-size: 1rem !important;
    }
    
    /* Reduce button heights on mobile - keep touch-friendly */
    .mud-button {
        height: 40px !important;
        min-height: 40px !important;
        padding: 0.375rem 0.875rem !important;
        font-size: 1rem !important;
    }
    
    .mud-button.mud-button-size-large {
        height: 44px !important;
        min-height: 44px !important;
        padding: 0.5rem 1rem !important;
    }
    
    /* Reduce form spacing on mobile - make more compact */
    .mb-4 {
        margin-bottom: 1.25rem !important;
    }
    
    .mb-3 {
        margin-bottom: 1rem !important;
    }
    
    .mb-2 {
        margin-bottom: 0.75rem !important;
    }
    
    .mb-1 {
        margin-bottom: 0.5rem !important;
    }
    
    /* Reduce upload area heights on mobile - make more compact */
    .upload-area {
        height: 70px !important;
        min-height: 70px !important;
    }
    
    /* Reduce template card heights on mobile - make more compact */
    .template-card {
        height: 3.5rem !important;
        min-height: 3.5rem !important;
        min-width: 5.5rem !important;
    }
    
    /* Reduce form section spacing - make more compact */
    .mud-stack > div {
        margin-bottom: 1rem !important;
    }
    
    /* Reduce numeric field heights on mobile */
    .mud-numeric-field .mud-input-root {
        min-height: 44px !important;
        max-height: 44px !important;
    }
    
    .mud-numeric-field .mud-input-root .mud-input-slot .mud-input {
        padding: 0.625rem 0.875rem !important;
        min-height: 44px !important;
        max-height: 44px !important;
        font-size: 1rem !important;
    }
    
    /* Reduce select field heights on mobile */
    .mud-select .mud-input-root {
        min-height: 44px !important;
        max-height: 44px !important;
    }
    
    .mud-select .mud-input-root .mud-input-slot .mud-input {
        padding: 0.625rem 0.875rem !important;
        min-height: 44px !important;
        max-height: 44px !important;
        font-size: 1rem !important;
    }
    
    /* Reduce date picker heights on mobile */
    .mud-date-picker .mud-input-root {
        min-height: 44px !important;
        max-height: 44px !important;
    }
    
    .mud-date-picker .mud-input-root .mud-input-slot .mud-input {
        padding: 0.625rem 0.875rem !important;
        min-height: 44px !important;
        max-height: 44px !important;
        font-size: 1rem !important;
    }
    
    /* Reduce form group spacing */
    .mud-form-field {
        margin-bottom: 1rem !important;
    }
    
    /* Reduce input adornment sizes */
    .mud-input-adornment {
        height: 44px !important;
        min-height: 44px !important;
    }
    
    .mud-input-adornment .mud-icon-button {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        min-height: 36px !important;
    }
    
    /* Make form sections more compact */
    .mud-paper.pa-6 {
        padding: 1.5rem !important;
    }
    
    /* Reduce spacing between form elements */
    .mud-stack {
        gap: 0.75rem !important;
    }
    
    /* Make form headings more compact */
    .mud-typography-h6.mb-2 {
        margin-bottom: 0.5rem !important;
    }
    
    /* Reduce spacing in form rows */
    .d-flex.gap-4 {
        gap: 1rem !important;
    }
    
    /* Make currency selector more compact */
    .mud-select .mud-input-root .mud-input-slot .mud-input {
        padding: 0.5rem 0.75rem !important;
    }
    
    /* Make quantity spinner more compact */
    .mud-numeric-field .mud-input-root .mud-input-slot .mud-input {
        padding: 0.5rem 0.75rem !important;
    }

    /*mud inputs*/

    .mud-input *, .mud-input-label {
        font-size: 0.7rem !important;
    }

    .mud-input {
        max-height: 3rem !important;
    }

        .mud-input:has(textarea) {
            max-height: 6rem !important;
            padding-top: 0.8rem;
        }

    .mud-input-numeric-spin {
        display: none !important;
    }

    .mud-input-root {
        margin: auto !important;    
    }

    .mud-table-cell:before {
        visibility: hidden;
        width: 0.2rem
    }

    .send-invoice-dialog-content {
        padding-left: 0 !important;
        padding-right: 0 !important;
        min-width: 17rem !important;
    }

}

/* Extra small mobile devices */
@media (max-width: 480px) {
    body {
        font-size: 12px !important;
        line-height: 1.3 !important;
    }
    
    .mud-typography-h1 {
        font-size: 1.25rem !important;
    }
    
    .mud-typography-h2 {
        font-size: 1.125rem !important;
    }
    
    .mud-typography-h3 {
        font-size: 1rem !important;
    }
    
    .mud-typography-h4 {
        font-size: 0.875rem !important;
    }
    
    .mud-typography-h5 {
        font-size: 0.75rem !important;
    }
    
    .mud-typography-h6 {
        font-size: 0.625rem !important;
    }
    
    .mud-typography-body1 {
        font-size: 0.75rem !important;
    }
    
    .mud-typography-body2 {
        font-size: 0.625rem !important;
    }
    
    .mud-button {
        font-size: 0.625rem !important;
    }
    
    .mud-text-field .mud-input-root .mud-input-slot .mud-input,
    .mud-text-field .mud-input-root .mud-input-slot .mud-input-label,
    .mud-text-field .mud-input-root .mud-input-slot .mud-input-helper-text {
        font-size: 0.625rem !important;
    }
    
    /* Extra small mobile form sizing */
    .mud-text-field .mud-input-root {
        min-height: 36px !important;
        max-height: 36px !important;
    }
    
    .mud-text-field .mud-input-root .mud-input-slot .mud-input {
        padding: 0.375rem 0.5rem !important;
        min-height: 36px !important;
        max-height: 36px !important;
        font-size: 0.625rem !important;
    }
    
    .mud-text-field .mud-input-root .mud-input-slot .mud-input-label {
        font-size: 0.625rem !important;
        transform: translateY(-0.375rem) !important;
    }
    
    .mud-text-field .mud-input-root .mud-input-slot .mud-input-label.mud-floating {
        transform: translateY(-1.125rem) scale(0.7) !important;
    }
    
    /* Reduce textarea heights even more on very small screens */
    .mud-input-control .mud-input-root .mud-input-slot .mud-input {
        min-height: 60px !important;
        max-height: 80px !important;
        padding: 0.375rem 0.5rem !important;
        font-size: 0.625rem !important;
    }
    
    /* Reduce button heights on very small screens */
    .mud-button {
        height: 32px !important;
        min-height: 32px !important;
        padding: 0.25rem 0.5rem !important;
        font-size: 0.625rem !important;
    }
    
    .mud-button.mud-button-size-large {
        height: 36px !important;
        min-height: 36px !important;
        padding: 0.25rem 0.75rem !important;
    }
    
    /* Reduce form spacing even more on very small screens */
    .mb-4 {
        margin-bottom: 0.75rem !important;
    }
    
    .mb-3 {
        margin-bottom: 0.5rem !important;
    }
    
    .mb-2 {
        margin-bottom: 0.375rem !important;
    }
    
    .mb-1 {
        margin-bottom: 0.25rem !important;
    }
    
    /* Reduce upload area heights on very small screens */
    .upload-area {
        height: 60px !important;
        min-height: 60px !important;
    }
    
    /* Reduce template card heights on very small screens */
    .template-card {
        height: 3rem !important;
        min-height: 3rem !important;
        min-width: 5rem !important;
    }
    
    /* Reduce form section spacing on very small screens */
    .mud-stack > div {
        margin-bottom: 0.5rem !important;
    }
    
    /* Reduce numeric field heights on very small screens */
    .mud-numeric-field .mud-input-root {
        min-height: 36px !important;
        max-height: 36px !important;
    }
    
    .mud-numeric-field .mud-input-root .mud-input-slot .mud-input {
        padding: 0.375rem 0.5rem !important;
        min-height: 36px !important;
        max-height: 36px !important;
        font-size: 0.625rem !important;
    }
    
    /* Reduce select field heights on very small screens */
    .mud-select .mud-input-root {
        min-height: 36px !important;
        max-height: 36px !important;
    }
    
    .mud-select .mud-input-root .mud-input-slot .mud-input {
        padding: 0.375rem 0.5rem !important;
        min-height: 36px !important;
        max-height: 36px !important;
        font-size: 0.625rem !important;
    }
    
    /* Reduce date picker heights on very small screens */
    .mud-date-picker .mud-input-root {
        min-height: 36px !important;
        max-height: 36px !important;
    }
    
    .mud-date-picker .mud-input-root .mud-input-slot .mud-input {
        padding: 0.375rem 0.5rem !important;
        min-height: 36px !important;
        max-height: 36px !important;
        font-size: 0.625rem !important;
    }
    
    /* Reduce form group spacing on very small screens */
    .mud-form-field {
        margin-bottom: 0.5rem !important;
    }
    
    /* Reduce input adornment sizes on very small screens */
    .mud-input-adornment {
        height: 36px !important;
        min-height: 36px !important;
    }
    
    .mud-input-adornment .mud-icon-button {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
        min-height: 28px !important;
    }
}

/* Document Type Pills Styles */
.document-type-pills-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 600px;
}

.document-type-pills-row {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-start;
}

.document-type-pill {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-align: center;
    min-width: 80px;
    user-select: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.document-type-pill:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.document-type-pill.selected {
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Mobile Document Type Pills */
.document-type-pills-container-mobile {
    width: 100%;
}

.document-type-pill-mobile {
    padding: 0.75rem 1rem;
    border-radius: 16px;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-align: center;
    user-select: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.document-type-pill-mobile:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.document-type-pill-mobile.selected {
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Status Checkbox Styling */
.status-checkbox {
    margin: 0;
}

.status-checkbox .mud-checkbox {
    margin: 0;
}

.status-checkbox .mud-checkbox .mud-checkbox-input {
    margin: 0;
}

.status-checkbox .mud-checkbox .mud-checkbox-label {
    margin-left: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Make checkboxes look more like radio buttons */
.status-checkbox .mud-checkbox .mud-checkbox-input .mud-checkbox-input-root {
    border-radius: 50%;
}

.status-checkbox .mud-checkbox .mud-checkbox-input .mud-checkbox-input-root:checked {
    background-color: var(--mud-palette-primary);
    border-color: var(--mud-palette-primary);
}

/* Responsive adjustments for pills */
@media (max-width: 768px) {
    .document-type-pills-container {
        min-width: auto;
        width: 100%;
    }
    
    .document-type-pills-row {
        justify-content: space-between;
    }
    
    .document-type-pill {
        flex: 1;
        min-width: 0;
        padding: 0.5rem 0.25rem;
        font-size: 0.65rem;
    }
}
