/* App Custom Styles */
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

* {
    font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
}

body {
    background-color: #0b1120;
    color: #f1f5f9;
    direction: rtl;
    text-align: right;
    user-select: none;
    -webkit-user-select: none;
    overflow-x: hidden;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}
::-webkit-scrollbar-track {
    background: #0b1120;
}
::-webkit-scrollbar-thumb {
    background: #23314c;
    border-radius: 4px;
}

/* Modals & Overlays */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(3, 7, 18, 0.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 16px;
    animation: fadeIn 0.2s ease-out;
}

.modal-content {
    background: #111a2e;
    border: 1px solid #233352;
    border-radius: 20px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.8);
    animation: zoomIn 0.2s ease-out;
}

/* Bottom Sheets */
.bottom-sheet-overlay {
    position: fixed;
    inset: 0;
    background: rgba(3, 7, 18, 0.85);
    backdrop-filter: blur(6px);
    z-index: 100;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    animation: fadeIn 0.2s ease-out;
}

.bottom-sheet-content {
    background: #111a2e;
    border-top: 1px solid #233352;
    border-radius: 24px 24px 0 0;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 -10px 30px -5px rgba(0, 0, 0, 0.7);
    animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* Clean Form Inputs */
.clean-input {
    width: 100%;
    background-color: #0d1527;
    border: 1px solid #1f2c45;
    border-radius: 12px;
    padding: 10px 14px;
    color: #f8fafc;
    font-size: 13px;
    transition: all 0.2s;
    outline: none;
}
.clean-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    background-color: #111b33;
}
.clean-input::placeholder {
    color: #64748b;
}

/* Shop Cards */
.shop-card {
    background: #131d31;
    border: 1px solid #202e48;
    border-radius: 16px;
    padding: 14px;
    transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.shop-card:hover {
    border-color: #2b3d60;
    box-shadow: 0 8px 20px -6px rgba(0, 0, 0, 0.4);
}

/* Quick Action Buttons */
.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.15s;
    cursor: pointer;
    border: none;
}
.action-btn:active {
    transform: scale(0.96);
}
.action-btn-call {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.action-btn-call:hover {
    background: rgba(16, 185, 129, 0.25);
}
.action-btn-route {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}
.action-btn-route:hover {
    background: rgba(59, 130, 246, 0.25);
}
.action-btn-chat {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.3);
}
.action-btn-chat:hover {
    background: rgba(139, 92, 246, 0.25);
}

/* Bottom Nav Items */
.nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: #94a3b8;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 12px;
    transition: all 0.2s;
    font-size: 10px;
    font-weight: 600;
}
.nav-btn.active {
    color: #38bdf8;
}
.nav-btn-fab {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.5);
    border: 2px solid #0b1120;
    cursor: pointer;
    transform: translateY(-8px);
    transition: transform 0.2s, box-shadow 0.2s;
}
.nav-btn-fab:active {
    transform: translateY(-5px) scale(0.95);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

/* Clean Chips & Tags */
.filter-chip {
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid #1f2c45;
    background: #0d1527;
    color: #cbd5e1;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
}
.filter-chip.active {
    background: #2563eb;
    color: white;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* Chat bubble styling */
.chat-bubble-visitor {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border-radius: 18px 18px 4px 18px;
    color: white;
}
.chat-bubble-system {
    background: #1c2742;
    border: 1px solid #2d3d5f;
    border-radius: 18px 18px 18px 4px;
    color: #f1f5f9;
}

/* Status Flag Badges */
.badge-blue { background: rgba(59, 130, 246, 0.2); color: #93c5fd; border: 1px solid rgba(59, 130, 246, 0.4); }
.badge-yellow { background: rgba(245, 158, 11, 0.2); color: #fcd34d; border: 1px solid rgba(245, 158, 11, 0.4); }
.badge-green { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.4); }
.badge-red { background: rgba(239, 68, 68, 0.2); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.4); }
.badge-purple { background: rgba(139, 92, 246, 0.2); color: #d8b4fe; border: 1px solid rgba(139, 92, 246, 0.4); }

/* Leaflet dark/modern adjustments */
.leaflet-container {
    font-family: 'Vazirmatn', sans-serif !important;
    border-radius: 14px;
    z-index: 10;
}
.leaflet-popup-content-wrapper {
    background: #17223b !important;
    color: #f8fafc !important;
    border-radius: 12px !important;
    border: 1px solid #2b3b5c;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.6) !important;
}
.leaflet-popup-tip {
    background: #17223b !important;
}

/* Fast buttons */
.btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    font-weight: 700;
    border-radius: 12px;
    padding: 10px 18px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.35);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
}
.btn-primary:active {
    transform: scale(0.97);
}

.btn-secondary {
    background: #1e293b;
    border: 1px solid #334155;
    color: #cbd5e1;
    font-weight: 600;
    border-radius: 12px;
    padding: 9px 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
}
.btn-secondary:hover {
    background: #273549;
    color: white;
}

/* Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(59, 130, 246, 0.25);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
