/* Custom styles - RTL Persian Real Estate PWA */

:root {
    --primary-color: #252B78;
    --success-color: #16a34a;
    --danger-color: #dc2626;
    --warning-color: #D9A64F;
    --safe-top: env(safe-area-inset-top);
    --safe-bottom: env(safe-area-inset-bottom);
    font-size: 16.5px;
}

html {
    font-size: 100%;
}

body {
    font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
    direction: rtl;
    text-align: right;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior: none;
    font-size: 1rem;
    line-height: 1.7;
}

/* Status badges */
.status-draft { background-color: #64748b; color: white; padding: 2px 8px; border-radius: 9999px; font-size: 0.7rem; }
.status-active { background-color: #16a34a; color: white; padding: 2px 8px; border-radius: 9999px; font-size: 0.7rem; }
.status-reserved { background-color: #f59e0b; color: #000; padding: 2px 8px; border-radius: 9999px; font-size: 0.7rem; }
.status-sold { background-color: #dc2626; color: white; padding: 2px 8px; border-radius: 9999px; font-size: 0.7rem; }
.status-archived { background-color: #6b7280; color: white; padding: 2px 8px; border-radius: 9999px; font-size: 0.7rem; }

/* Upload zone */
.upload-zone {
    border: 2px dashed #9ca3af;
    border-radius: 0.5rem;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}
.upload-zone:hover, .upload-zone.dragover {
    border-color: #252B78;
    background-color: rgba(37, 99, 235, 0.05);
}

/* Table RTL */
.table th, .table td { text-align: right; vertical-align: middle; }

/* Form RTL */
.form-control, .form-select { text-align: right; }

/* PWA-specific */
.standalone body { padding-top: var(--safe-top); }

/* Scrollbar styling */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* Mobile compact spacing */
@media (max-width: 640px) {
    main { padding: 0.5rem 0.5rem !important; }

    /* Compact card headers */
    .grid > div > div { border-radius: 0.75rem; }

    /* Reduce table cell padding on mobile */
    table td, table th { padding: 0.375rem 0.5rem !important; }

    /* Slightly larger font for body on mobile */
    html { font-size: 15.5px; }
    body { font-size: 15px; line-height: 1.65; }

    /* Comfortable form inputs */
    input, select, textarea {
        font-size: 15px !important;
        min-height: auto !important;
    }

    /* Slightly larger buttons */
    button { font-size: 0.9rem; }

    /* Dashboard stat cards compact */
    .grid.grid-cols-2 > a > div:first-child,
    .grid.grid-cols-2 > div:first-child > div {
        font-size: 1.25rem;
    }

    /* Hide scrollbar on mobile */
    ::-webkit-scrollbar { display: none; }
    * { scrollbar-width: none; }
}

/* Medium screens */
@media (min-width: 641px) and (max-width: 1024px) {
    main { padding: 0.75rem 1rem !important; }
}

/* Print */
@media print {
    .no-print { display: none !important; }
    body { font-size: 11pt; direction: rtl; }
}

/* Dark mode support (future) */
@media (prefers-color-scheme: dark) {
    /* Can be enabled later */
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
