﻿body, html {
    height: 100%;
}

#app {
    height: 100%
}

.page-content {
    height: 100%;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#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;
    }

td.rotate {
    vertical-align: middle;
    text-align: center;
    padding: 0px;
}

    td.rotate span {
        -ms-writing-mode: tb-rl;
        -webkit-writing-mode: vertical-rl;
        writing-mode: vertical-rl;
        transform: rotate(180deg);
        white-space: nowrap;
    }



.fieldset-delete-btn {
    position: absolute;
    top: -25px;
    right: 20px;
}

.working-process-steps {
    display: block;
    width: 100%;
    position: relative;
    border: 1px solid #dadfe2;
    padding: 10px;
    margin-bottom: 1rem
}

.spin {
    display: inline-block;
    animation: spin-keyframes 1s linear infinite;
    vertical-align: middle;
}

.mr-1 {
    margin-right: .25rem;
}

@keyframes spin-keyframes {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Global Print Styles - Hide Radzen Layout Elements */
@media print {
    /* Reset page margins and setup */
    @page {
        size: landscape;
        margin: 0.5cm;
    }

    /* Reset body and html for printing */
    html,
    body {
        height: auto !important;
        overflow: visible !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Hide all Radzen layout and navigation elements */
    .rz-sidebar,
    aside.rz-sidebar,
    .rz-header,
    header.rz-header,
    .rz-panel-menu,
    nav,
    aside,
    header,
    .rz-sidebar-toggle {
        display: none !important;
        visibility: hidden !important;
    }

    /* Make the layout full width and auto height */
    .rz-layout {
        display: block !important;
        grid-template-areas: none !important;
        grid-template-columns: 1fr !important;
        grid-template-rows: auto !important;
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
    }

    /* Make body take full width and auto height */
    .rz-body,
    main.rz-body {
        grid-column: 1 / -1 !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }

    /* Remove all Radzen row/column constraints */
    .rz-row,
    .rz-column {
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Page content should be visible */
    .page-content,
    #app {
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }

    /* Radzen Stack components */
    .rz-stack {
        height: auto !important;
        overflow: visible !important;
    }

    /* Hide all buttons globally */
    button,
    .rz-button,
    a.rz-button,
    .rz-icon-button {
        display: none !important;
    }

    /* Hide input controls and make them look like text */
    input[type="text"],
    input[type="number"],
    select,
    textarea {
        border: none !important;
        background: transparent !important;
        -webkit-appearance: none !important;
        -moz-appearance: none !important;
        appearance: none !important;
        pointer-events: none !important;
    }

    /* Hide select dropdown arrows */
    select {
        -webkit-appearance: none !important;
        -moz-appearance: none !important;
        appearance: none !important;
    }

    /* Table specific styles for printing */
    table {
        page-break-inside: auto !important;
        width: 100% !important;
        display: table !important;
    }

    tr {
        page-break-inside: avoid !important;
        page-break-after: auto !important;
    }

    thead {
        display: table-header-group !important;
    }

    tfoot {
        display: table-footer-group !important;
    }

    tbody {
        display: table-row-group !important;
    }

    /* Excel-like table styles for daily cash report */
    table.excel {
        border-collapse: collapse !important;
        width: 100% !important;
        font-size: 9pt !important;
    }

    table.excel th,
    table.excel td {
        border: 1px solid #000 !important;
        padding: 3px 5px !important;
        page-break-inside: avoid !important;
    }

    /* Ensure all rows are visible */
    table.excel tbody tr,
    table.excel thead tr,
    table.excel tfoot tr {
        page-break-inside: avoid !important;
    }

    /* Background colors for print */
    .rz-background-color-success-lighter,
    table.excel .rz-background-color-success-lighter {
        background-color: #d4edda !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .rz-background-color-danger-lighter,
    table.excel .rz-background-color-danger-lighter {
        background-color: #f8d7da !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Ensure pinned rows and group rows are visible */
    .pinned-row,
    .group-row {
        page-break-inside: avoid !important;
    }

    /* Group row styling */
    .group-row td {
        font-weight: bold !important;
        background-color: #f0f0f0 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Hide alerts and notifications */
    .rz-alert,
    .rz-notification,
    .rz-progressbar {
        display: none !important;
    }

    /* Make sure container divs don't have overflow hidden */
    div,
    section,
    article {
        overflow: visible !important;
        height: auto !important;
        max-height: none !important;
    }

    /* Hide Radzen icons in table cells (edit, delete, etc.) */
    .rz-icon,
    table .rz-icon {
        display: none !important;
    }

    /* Simplify heading styles */
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid !important;
        page-break-inside: avoid !important;
    }

    /* Remove excessive margins and padding */
    .rz-mb-3,
    .rz-my-3,
    .rz-mt-3,
    .rz-px-2,
    .rz-px-4,
    .rz-pt-2,
    .rz-pt-md-4,
    .rz-pt-lg-6,
    .rz-pb-2 {
        margin: 0.2cm 0 !important;
        padding: 0 !important;
    }

    /* Ensure CurrencyInput and CurrencyDisplay show values */
    .currency-input,
    .currency-display {
        border: none !important;
        background: transparent !important;
    }
}

/* Print mode class - applied via JavaScript before printing */
body.print-mode,
body.print-mode * {
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
    min-height: auto !important;
}

