@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

/* Calculated values label/value pairs */
dl.calc-values {
    margin: 0;
}

dl.calc-values > div {
    display: flex;
    align-items: baseline;
    padding: 4px 0;
    border-bottom: 1px solid #f0f0f0;
}

dl.calc-values dt {
    flex: 0 0 180px;
    font-weight: 500;
    color: #555;
    margin: 0;
}

dl.calc-values dd {
    flex: 1;
    margin: 0;
    font-weight: 600;
}

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

html, body {
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

.button-link {
    text-decoration: unset;
}

#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;
}

.title {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-bottom: 0.625rem;
}

.title.title-secondary {
    padding-top: 0.313rem;
    padding-bottom: 0;
    color: var(--bs-secondary-color, var(--dxds-color-content-neutral-default-rest));
}

.title-header-text {
    font-size: 2.5rem;
    line-height: 3rem;
    font-weight: 600;
    letter-spacing: 0rem;
    padding: 0.3125rem 0;
}

.title-content-text {
    font-size: 1.75rem;
    font-weight: 400;
    line-height: 2.5rem;
    letter-spacing: 0rem;
}

.main-content {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
}

.block-content {
    width: 31.25rem;
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    max-width: 100%;
}

.icon {
    width: var(--icon-width);
    height: var(--icon-height);
    background-color: currentcolor;
    mask-position: center center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-image: var(--icon-mask-image);
    mask-image: var(--icon-mask-image);
}

.or {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0.3125rem 0;
}

.or .or-line {
    border-bottom: 1px solid var(--bs-body-color, var(--dxds-color-content-neutral-default-rest));
    width: 100%;
    opacity: 0.2;
}

.or .or-text {
    padding: 0 0.625rem 0px 0.625rem;
    font-size: 0.75rem;
    line-height: 1.125rem;
    color: var(--bs-body-color, var(--dxds-color-content-neutral-default-rest));
    opacity: 0.7;
}

.links-area {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    padding-top: 0.625rem;
}

.links-container {
    display: flex;
    gap: 0.25rem;
    justify-content: center;
    align-items: center;
}

.links-container .dot {
    height: 0.3125rem;
    width: 0.3125rem;
    margin: 0 0.1875rem;
    border-radius: 50%;
    background-color: var(--bs-body-color, var(--dxds-color-content-neutral-default-rest));
    opacity: 0.7;
}

.manage-layout {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.info-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.15;
    background: var(--bs-primary, var(--dxds-primary-90));
    z-index: -1;
}

.info-message {
    padding: 0.625rem 1rem 0.625rem 1rem;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.info-message.info-panel {
    margin-bottom: 0.625rem;
}

.manage-content {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.large-input {
    height: 4.3125rem;
    font-size: 1.875rem;
}

.title-content-text-secondary {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.button-group {
    display: flex;
    flex-direction: row;
    gap: 0.625rem;
}

.confirm-button {
    margin-top: 0.3125rem;
}

.display-desktop {
    display: block;
}

.display-mobile {
    display: none;
}

.icon-external-provider {
    width: var(--icon-provider-width);
    height: var(--icon-provider-height);
    background-image: var(--icon-provider-background-image);
    background-position: center;
    background-repeat: no-repeat;
}

@media (max-width: 768px) {
    .display-desktop {
        display: none;
    }

    .display-mobile {
        display: block;
    }
}

/* ============================================================
   Responsive: Tablet  (481px – 1024px)
   ============================================================ */
@media (min-width: 481px) and (max-width: 1024px) {
    .title-header-text {
        font-size: 2rem;
        line-height: 2.5rem;
    }

    .title-content-text {
        font-size: 1.5rem;
        line-height: 2rem;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }
}

/* ============================================================
   Responsive: Phone  (≤ 480px)
   ============================================================ */
@media (max-width: 480px) {

    /* --- Typography --- */
    .title-header-text {
        font-size: 1.5rem;
        line-height: 2rem;
    }

    .title-content-text {
        font-size: 1.25rem;
        line-height: 1.75rem;
    }

    .title-content-text-secondary {
        font-size: 1rem;
        line-height: 1.5rem;
    }

    .page-header h1 {
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
    }

    /* --- Page padding --- */
    .page-container {
        padding: 0.5rem;
    }

    /* --- Toolbar: ensure items wrap rather than overflow --- */
    .dxbl-toolbar-items-container {
        flex-wrap: wrap !important;
        gap: 4px;
    }

    /* --- Grid action buttons: hide text labels, keep icons --- */
    .grid-actions .dxbl-text {
        display: none;
    }

    .grid-actions .dxbl-btn {
        padding: 4px 6px;
        min-width: 32px;
    }

    /* --- Touch targets: minimum 44×44 px for all buttons --- */
    .dxbl-btn {
        min-height: 44px;
    }

    .dxbl-btn.dxbl-btn-sm {
        min-height: 36px; /* small buttons stay compact but tappable */
    }

    /* --- Grid: hide secondary columns on phone --- */
    .dxbl-grid th.col-phone-hide,
    .dxbl-grid td.col-phone-hide {
        display: none !important;
    }

    /* --- Drawer: cap width so content area remains usable --- */
    .dxbl-drawer-panel {
        max-width: 85vw !important;
    }
}

/* ============================================================
   Help Panel (right-side drawer)
   ============================================================ */

/* Drawer panel chrome */
.help-drawer .dxbl-drawer-panel {
    border-left: 1px solid var(--bs-border-color, #dee2e6);
    background-color: var(--bs-body-bg, #fff);
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Inner panel fills the drawer height */
.help-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.help-panel-header {
    flex-shrink: 0;
}

.help-panel-body {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.help-panel-footer {
    flex-shrink: 0;
}

.help-readonly-content {
    max-height: 100%;
}

/* Tab page wrapper for grid components */
.tab-page-content-wrapper {
    padding: 1rem;
}

/* Packout Details Grid Container */
.packout-details-grid-container {
    width: 100%;
}

/* Packout Details Grid - concrete height for virtual scrolling + summary footer */
.packout-details-grid {
    height: calc(100vh - 450px);
    min-height: 300px;
    max-height: 600px;
}

/* Template Details Grid - Virtual Scrolling */
.my-grid {
    height: calc(100vh - 500px);
    max-height: 600px;
    min-height: 300px;
}

/* ============================================================
   DxGrid Virtual Scrolling - Responsive Height Classes
   ============================================================ */

/* Full-page grids - use most of viewport height */
.grid-fullpage {
    height: calc(100vh - 250px);
    min-height: 500px;
    max-height: calc(100vh - 200px);
}

/* Standard management grids - balanced height */
.grid-standard {
    height: 600px;
    min-height: 400px;
    max-height: 75vh;
}

/* Compact grids - for sidebar or embedded contexts */
.grid-compact {
    height: 400px;
    min-height: 300px;
    max-height: 50vh;
}

/* Small grids - for dialogs or limited data */
.grid-small {
    height: 300px;
    min-height: 200px;
    max-height: 40vh;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .grid-fullpage {
        height: calc(100vh - 200px);
        min-height: 400px;
    }

    .grid-standard {
        height: 500px;
        min-height: 300px;
        max-height: 70vh;
    }

    .grid-compact {
        height: 350px;
        min-height: 250px;
    }

    .packout-details-grid {
        height: calc(100vh - 400px);
        max-height: 500px;
        min-height: 250px;
    }

    .my-grid {
        height: calc(100vh - 400px);
        max-height: 500px;
        min-height: 250px;
    }
}

/* Tab page content area - Simple approach */
.dxbl-fl-tab-page {
    min-height: 600px;
}

/* Remove forced styles */
.dxbl-fl-tab-pages {
    /* Let DevExpress handle layout */
}
