@import 'tailwindcss';

@layer base {
    html {
        direction: rtl;
        scroll-behavior: smooth;
        -webkit-tap-highlight-color: transparent;
    }

    /* Touch-friendly minimum heights */
    input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
    select,
    textarea {
        min-height: 44px;
    }

    /* Universal button/link press feedback */
    button:not(:disabled),
    [role="button"],
    a[href],
    summary {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    button:not(:disabled):active,
    [role="button"]:active,
    a[href]:active,
    summary:active {
        transform: scale(0.97);
        transition: transform 0.1s ease;
    }

    /* Prevent stuck hover on touch devices */
    @media (hover: none) {
        button:hover,
        a:hover {
            background-color: inherit;
        }
    }
}

@layer utilities {
    .safe-bottom {
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }
    .safe-top {
        padding-top: env(safe-area-inset-top, 0px);
    }
    /* Press feedback utility — stronger scale for primary actions */
    .press-feedback:active {
        transform: scale(0.95) !important;
        opacity: 0.9;
    }
}

/* Print: hide all app chrome */
@media print {
    aside, nav, header, .no-print, [data-topbar], .print\:hidden {
        display: none !important;
    }
    main {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }
    body {
        background: white !important;
    }
    .lg\:ms-64 {
        margin-inline-start: 0 !important;
    }
}
