/* NajehSoft Pro - Web Application Styles */

/* Base RTL Support */
html {
    direction: rtl;
}

body {
    font-family: 'Cairo', 'Segoe UI', 'Roboto', sans-serif;
    direction: rtl;
    text-align: right;
}

/* Override MudBlazor defaults for RTL */
.mud-rtl .mud-drawer {
    right: 0;
    left: auto;
}

.mud-rtl .mud-drawer-content {
    text-align: right;
}

.mud-rtl .mud-nav-link {
    text-align: right;
}

.mud-rtl .mud-input-label {
    right: 0;
    left: auto;
    transform-origin: top right;
}

.mud-rtl .mud-input-adornment-start {
    margin-left: 8px;
    margin-right: 0;
}

.mud-rtl .mud-input-adornment-end {
    margin-right: 8px;
    margin-left: 0;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Print styles */
@media print {
    .mud-appbar,
    .mud-drawer,
    .no-print {
        display: none !important;
    }

    .mud-main-content {
        padding: 0 !important;
        margin: 0 !important;
    }

    body {
        font-size: 12pt;
    }

    .print-only {
        display: block !important;
    }
}

.print-only {
    display: none;
}

/* Invoice print layout */
.invoice-print {
    max-width: 210mm;
    margin: 0 auto;
    padding: 10mm;
}

.invoice-print .header {
    text-align: center;
    margin-bottom: 20px;
}

.invoice-print .company-logo {
    max-width: 150px;
    max-height: 80px;
}

.invoice-print .qr-code {
    width: 100px;
    height: 100px;
}

/* Dashboard cards */
.dashboard-card {
    transition: transform 0.2s ease-in-out;
}

.dashboard-card:hover {
    transform: translateY(-2px);
}

/* Data grid improvements */
.mud-table-cell {
    white-space: nowrap;
}

.mud-table-cell.wrap-text {
    white-space: normal;
}

/* Form improvements */
.form-section {
    margin-bottom: 24px;
    padding: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.form-section-title {
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--mud-palette-primary);
}

/* Number display (always LTR) */
.number-ltr {
    direction: ltr;
    text-align: left;
}

/* Currency display */
.currency {
    font-weight: 500;
}

.currency.positive {
    color: var(--mud-palette-success);
}

.currency.negative {
    color: var(--mud-palette-error);
}

/* Currency symbol text */
.currency-symbol {
    font-weight: 500;
}

/* Saudi Riyal Icon Font adjustments */
[class^="icon-saudi_riyal"],
[class*="icon-saudi_riyal"] {
    display: inline-block;
    vertical-align: middle;
    line-height: 1;
    font-size: 1.4em;
}

/* Spacing for icon when placed after amount */
.icon-saudi_riyal,
.icon-saudi_riyal_bold {
    margin-inline-start: 8px;
}

/* Status badges */
.status-badge {
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-active {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.status-inactive {
    background-color: #fafafa;
    color: #757575;
}

.status-pending {
    background-color: #fff3e0;
    color: #e65100;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Hijri date display */
.hijri-date {
    font-size: 0.85em;
    color: #666;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .hide-on-mobile {
        display: none !important;
    }

    .mud-table-cell {
        font-size: 0.875rem;
    }
}

/* Animation for notifications */
@keyframes slideIn {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-enter {
    animation: slideIn 0.3s ease-out;
}
