/* =========================================
   Main CSS - Global Styles
   ========================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    direction: rtl;
}

:root {
    --primary-900: #082354;
    --primary-800: #0a2f72;
    --primary-700: #18408d;
    --primary-100: #edf2ff;
    --primary-50: #f5f8ff;

    --neutral-0: #ffffff;
    --neutral-50: #fbfcfe;
    --neutral-100: #f6f8fb;
    --neutral-150: #eef2f7;
    --neutral-200: #e5eaf1;
    --neutral-300: #cfd7e3;
    --neutral-500: #607089;
    --neutral-700: #344054;
    --neutral-900: #182230;

    --success-100: #e9f9ee;
    --success-700: #0f7a39;
    --danger-100: #fff1f1;
    --danger-700: #c81e1e;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;

    --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
    --shadow-md: 0 4px 12px rgba(16, 24, 40, 0.08);
    --shadow-lg: 0 10px 26px rgba(16, 24, 40, 0.12);

    --focus-ring: 0 0 0 3px rgba(24, 64, 141, 0.16);
    --transition-fast: 0.16s ease;
    --transition-base: 0.22s ease;
}

body {
    font-family: 'Heebo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(180deg, var(--neutral-50), var(--neutral-100));
    color: var(--neutral-900);
    direction: rtl;
    text-align: right;
    min-height: 100vh;
    line-height: 1.55;
}

/* Development Notice Banner */
/* ההודעה של הבהרה שהמערכת בפיתוח ויש אי דיוקים */

.dev-notice {
    background-color: #fff3cd;
    border-bottom: 1px solid #ffc107;
    color: #856404;
    padding: 10px 20px;
    text-align: center;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.dev-notice i {
    font-size: 16px;
}
/* סיום הקטע של הבהרה שהמערכת בפיתוח ויש אי דיוקים */

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--neutral-900);
    text-align: right;
}

p, label, span {
    text-align: right;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Buttons */
button {
    cursor: pointer;
    border: none;
    font-family: inherit;
}

/* Form Elements */
input, select, textarea {
    font-family: inherit;
    font-size: 14px;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-700) !important;
    box-shadow: var(--focus-ring);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--neutral-150);
}

::-webkit-scrollbar-thumb {
    background: #bcc6d7;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9ba9c0;
}

/* =========================================
   Toast Notifications
   ========================================= */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    padding: 14px 24px;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toastSlideIn 0.3s ease-out;
    pointer-events: auto;
    max-width: 400px;
    text-align: right;
    direction: rtl;
}

.toast.toast-success {
    background: linear-gradient(135deg, #4CAF50, #45a049);
}

.toast.toast-error {
    background: linear-gradient(135deg, #f44336, #d32f2f);
}

.toast.toast-warning {
    background: linear-gradient(135deg, #ff9800, #f57c00);
}

.toast.toast-info {
    background: linear-gradient(135deg, #2196F3, #1976D2);
}

.toast i {
    font-size: 18px;
}

.toast.toast-hide {
    animation: toastSlideOut 0.3s ease-in forwards;
}

/* =========================================
   App Dialog Modal (Confirm / Info)
   ========================================= */
.app-dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 11000;
    padding: 16px;
}

.app-dialog {
    width: min(520px, 100%);
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22);
    border-top: 6px solid #2196F3;
    overflow: hidden;
    direction: rtl;
    text-align: right;
}

.app-dialog-warning {
    border-top-color: #ff9800;
}

.app-dialog-success {
    border-top-color: #4CAF50;
}

.app-dialog-error {
    border-top-color: #f44336;
}

.app-dialog-header {
    padding: 16px 18px 8px;
}

.app-dialog-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #2f2f2f;
}

.app-dialog-body {
    padding: 8px 18px 0;
    color: #444;
    font-size: 0.98rem;
    line-height: 1.55;
    white-space: pre-line;
}

.app-dialog-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
    padding: 18px;
}

.app-dialog-btn {
    min-width: 96px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-size: 0.94rem;
    font-weight: 600;
}

.app-dialog-btn-primary {
    background: #1f8d6b;
    color: #fff;
}

.app-dialog-btn-primary:hover {
    background: #177256;
}

.app-dialog-btn-secondary {
    background: #f5f5f5;
    border-color: #d7d7d7;
    color: #333;
}

.app-dialog-btn-secondary:hover {
    background: #ececec;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

@media (max-width: 640px) {
    .app-dialog-overlay {
        padding: 12px;
        align-items: flex-end;
    }

    .app-dialog {
        width: 100%;
        border-radius: 14px 14px 10px 10px;
    }

    .app-dialog-title {
        font-size: 1rem;
    }

    .app-dialog-body {
        font-size: 0.95rem;
    }

    .app-dialog-actions {
        gap: 8px;
    }

    .app-dialog-btn {
        flex: 1;
        min-width: 0;
        padding: 11px 10px;
    }
}

/* Disabled button with timer */
button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

button.btn-countdown {
    position: relative;
}

button.btn-countdown .countdown-text {
    display: inline;
}

/* =========================================
   Loading Spinner
   ========================================= */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 20px;
}

.loading-container.hidden {
    display: none;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-spinner i {
    font-size: 48px;
    color: #4CAF50;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 16px;
    color: #666;
    text-align: center;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}














/* התאמות למדריך הניסוי */
.driver-popover {
    font-family: 'Heebo', sans-serif !important;
    direction: rtl !important;
    text-align: right !important;
}

.driver-popover-title {
    color: #0a2f72 !important;
    font-weight: 700 !important;
}

.driver-popover-footer {
    display: flex !important;
    flex-direction: row-reverse !important; /* הופך את כפתורי הניווט להתאמה לעברית */
    justify-content: space-between !important;
}

.driver-popover-next-btn {
    background-color: #0a2f72 !important;
    color: white !important;
    border: none !important;
    text-shadow: none !important;
}

.driver-popover-prev-btn {
    background-color: #f3f4f6 !important;
    color: #4b5563 !important;
    border: 1px solid #d1d5db !important;
}

.driver-popover-progress-text {
    color: #6b7280 !important;
}