﻿/* ==========================================================================
   GOTHAM HTF – CLIENT'S EXACT FONT FILES (Dec 2025)
   ========================================================================== */
@font-face {
    font-family: 'Gotham';
    src: url('../fonts/GothamHTF-Book.otf') format('opentype');
    font-weight: 400; /* Normal / Book */
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Gotham';
    src: url('../fonts/GothamHTF-Medium.otf') format('opentype');
    font-weight: 500; /* Medium */
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Gotham';
    src: url('../fonts/GothamHTF-Bold.otf') format('opentype');
    font-weight: 700; /* Bold */
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Gotham';
    src: url('../fonts/GothamHTF-Black.otf') format('opentype');
    font-weight: 900; /* Black */
    font-style: normal;
    font-display: swap;
}

/* Condensed versions – optional, only if you ever need them */
@font-face {
    font-family: 'Gotham Condensed';
    src: url('../fonts/GothamHTF-BookCondensed.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Gotham Condensed';
    src: url('../fonts/GothamHTF-MediumCondensed.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Gotham Condensed';
    src: url('../fonts/GothamHTF-BoldCondensed.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* FORCE GOTHAM EVERYWHERE – beats MudBlazor’s Roboto completely */
html, body,
.mud-typography-body1, .mud-typography-body2,
.mud-typography-subtitle1, .mud-typography-subtitle2,
.mud-typography-h1, .mud-typography-h2, .mud-typography-h3,
.mud-typography-h4, .mud-typography-h5, .mud-typography-h6,
.mud-input-control > input,
.mud-select-input,
.mud-table, .mud-button-root,
input, button, textarea, select,
* {
    font-family: 'Gotham', 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
}

/* ==========================================================================
   GLOBAL & LAYOUT
   ========================================================================== */
body {
    margin: 0;
}

#blazor-error-ui {
    display: none;
}

/* ==========================================================================
   PRODUCT DETAILS (legacy table layout – kept just in case)
   ========================================================================== */
.product-detail-table {
    display: table;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.75rem;
}

    .product-detail-table > div {
        display: table-row;
    }

    .product-detail-table .label {
        display: table-cell;
        width: 40%;
        font-weight: 600;
        color: #444;
        padding-right: 1rem;
        vertical-align: top;
    }

    .product-detail-table .value {
        display: table-cell;
        text-align: right;
        font-weight: 500;
        color: #000;
        vertical-align: top;
    }

.status-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    min-width: 85px;
    text-align: center;
}

    .status-badge.active {
        background: #d1fae5;
        color: #065f46;
    }

    .status-badge.inactive {
        background: #fee2e2;
        color: #991b1b;
    }

.product-description {
    line-height: 1.7;
    font-size: 0.95rem;
    color: #333;
}

    .product-description p {
        margin: 0.75rem 0;
    }

/* ==========================================================================
   MUD HELPERS
   ========================================================================== */
.w-100 {
    width: 100% !important;
}

.mud-typography-bold {
    font-weight: 700 !important;
}

.mud-text-white {
    color: white !important;
}

.rounded-pill {
    border-radius: 999px !important;
}

.mud-badge-rounded .mud-badge-content,
.mud-status-pill .mud-badge-content {
    border-radius: 20px !important;
    padding: 6px 16px !important;
    font-weight: 600 !important;
    font-size: 0.875rem !important;
}

/* ==========================================================================
   PRICING TABLE – only affects this exact class
   ========================================================================== */
.product-pricing-table-2025 .mud-table-head {
    background-color: rgba(0,0,0,0.12) !important;
    border-bottom: 2px solid rgba(0,0,0,0.30) !important;
}

    .product-pricing-table-2025 .mud-table-head th {
        font-weight: 700 !important;
        color: #000 !important;
        text-transform: uppercase !important;
        font-size: 0.75rem !important;
        letter-spacing: 0.05em !important;
        border-right: 1px solid var(--mud-palette-lines-default) !important;
    }

        .product-pricing-table-2025 .mud-table-head th:last-child {
            border-right: none !important;
        }

.product-pricing-table-2025 tbody tr:hover {
    background-color: rgba(0,0,0,0.04) !important;
}

/* ==========================================================================
   NAVIGATION – perfect white text + arrow
   ========================================================================== */
.mud-drawer .mud-nav-link,
.mud-drawer .mud-nav-group > .mud-navmenu-title {
    color: white !important;
}

.mud-drawer .mud-nav-group .mud-expand-icon,
.mud-drawer .mud-nav-group .mud-collapse-icon {
    color: white !important;
}

/* ==========================================================================
   OTHER STYLES
   ========================================================================== */
.field-caption {
    font-weight: 500;
    color: #666;
}

.bold-subtitle {
    font-weight: 600 !important;
}

.full-width-card {
    width: 100%;
}

/* STOP MUDBLAZOR FROM SHOUTING AT US */
.mud-button-label {
    text-transform: none !important;
}

/* GLOBAL FULL-SCREEN LOADER – WORKS EVERYWHERE, BLOCKS EVERYTHING */
.global-loader-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background-color: rgba(255, 255, 255, 0.95) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 9999 !important;
    backdrop-filter: blur(4px);
    pointer-events: auto !important; /* blocks clicks */
}

.global-loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 32px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

/* Fix MudExpansionPanel default left padding on title */
/* FORCE SEARCH CRITERIA TO ALIGN WITH ADD NEW BUTTON */
.search-panel-no-padding .mud-expansion-panel-header {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.search-panel-no-padding .mud-expansion-panel-content > .mud-expansion-panel-content-inner {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.mud-expansion-panel--no-padding .mud-expansion-panel-header {
    padding: 0 !important;
}

.equal-height-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.equal-height-card > .mud-card-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.order-entry-page {
    font-size: 0.9rem;
}

.order-entry-page .mud-typography-h4,
.order-entry-page .mud-typography-h5,
.order-entry-page .mud-typography-h6 {
    font-size: 1.1rem !important;
}

/* ==========================================================================
   BALANCED & TIGHT SPACING FOR ORDER ENTRY PAGE – MORE TOP SPACE (Jan 2026)
   ========================================================================== */

.order-entry-page {
    --mud-input-margin-top: 0.3rem !important;      /* Increased top margin for breathing room */
    --mud-input-margin-bottom: 0.35rem !important;  /* Slightly reduced bottom for balance */
}

/* Target inputs and containers */
.order-entry-page .mud-input-control,
.order-entry-page .mud-input-slot,
.order-entry-page .mud-input-root,
.order-entry-page .mud-text-field,
.order-entry-page .mud-numeric-field,
.order-entry-page .mud-input-adornment,
.order-entry-page .mud-input-label {
    margin-top: 0.3rem !important;          /* More top space */
    margin-bottom: 0.35rem !important;
    padding-top: 0.25rem !important;
    padding-bottom: 0.3rem !important;
}

/* Pull labels up closer but keep top margin visible */
.order-entry-page .mud-input-label {
    margin-bottom: 0.15rem !important;
    transform: translateY(0) !important;
    top: 0.7rem !important; /* Slightly higher label position */
}

/* Grid & Item – top slightly more, bottom tighter */
.order-entry-page .mud-grid {
    margin-top: 0.35rem !important;     /* Increased top for grid */
    margin-bottom: 0.3rem !important;
    row-gap: 0.3rem !important;
}

.order-entry-page .mud-item {
    padding-top: 0.25rem !important;    /* Top padding increased a bit */
    padding-bottom: 0.25rem !important; /* Bottom reduced for balance */
}

/* Override grid spacing */
.order-entry-page .mud-grid-spacing-4 > .mud-item {
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
}

/* Reduce extra space around MudPaper */
.order-entry-page .mud-paper {
    padding-top: 1rem !important;
    padding-bottom: 0.8rem !important;
}

/* Target last items to avoid extra bottom space */
.order-entry-page .mud-grid > .mud-item:last-child {
    margin-bottom: 0.15rem !important;
}

/* Minimize helper/error text space (often causes extra bottom gap) */
.order-entry-page .mud-input-helper-text,
.order-entry-page .mud-input-error {
    margin-top: 0.1rem !important;
    margin-bottom: 0.15rem !important;
}

/* Make plain select look like MudSelect */
.mud-field select {
    width: 100%;
    height: 56px;
    padding: 0 32px 0 12px;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--mud-palette-text-primary);
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-inputs);
    border-radius: 4px;
    appearance: none;
    cursor: pointer;
}

/* Dropdown arrow (MudBlazor style) */
.mud-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23000000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

.mud-field select:focus {
    outline: none;
    border-color: var(--mud-palette-primary);
    box-shadow: 0 0 0 2px rgba(var(--mud-palette-primary-rgb), 0.2);
}

/* Hover effect */
.mud-field:hover select {
    border-color: var(--mud-palette-primary);
}
select.mud-select-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    padding-right: 36px !important; /* Make space for arrow */
}