/**
 * Base Styles - סגנונות בסיסיים משותפים
 * כל הסגנונות הבסיסיים שצריכים להיות זמינים בכל מקום
 */

/* ========================================
   FONT IMPORTS - ייבוא פונטים
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Assistant:wght@200;300;400;500;600;700;800&display=swap');

/* ========================================
   CSS VARIABLES - משתני CSS
   ======================================== */

:root {
  /* Colors - צבעים */
  --color-primary: #d82466;
  --color-primary-hover: #EB7AA7;
  --color-primary-light: #fce9f0;
  --color-secondary: #2D3461;
  --color-bg-light-blue: #F1FAFD;
  --color-focus-outline: #F4B8D1;
  --color-border-light-blue: #E8F6FC;
  --color-button-light-gray: #F8F8F9;
  --color-white: #ffffff;
  --color-gray-50: #f9fafb;
  --color-gray-100: #f3f4f6;
  --color-gray-200: #E2E6E9;
  --color-gray-300: #d1d5db;
  --color-gray-400: #9ca3af;
  --color-gray-500: #6b7280;
  --color-gray-600: #4b5563;
  --color-gray-700: #374151;
  --color-gray-800: #1f2937;
  --color-gray-900: #111827;
  /* Status Colors */
  --color-success: #10b981;
  --color-success-light: #d1fae5;
  --color-warning: #f59e0b;
  --color-warning-light: #fef3c7;
  --color-error: #ef4444;
  --color-error-light: #fee2e2;
  --color-info: #3b82f6;
  --color-info-light: #dbeafe;
  --color-disabled: #D3D9DE;
  --color-disabled-text: #98A6B3;
  
  /* Design Tokens - Figma / Schedule Form (רק משתנים שאין להם מקביל ב-base) */
  --color-primary-dark: #b01d52;
  --color-text-primary: #3d4784;
  --color-text-title: #050e42;
  --color-text-subtitle: #3d4784;
  --color-text-caption: #5a6976;
  --color-border: #5a6976;
  --color-bg-search: #f2f2f2;
  --color-bg-separator: #fce9f0;
  --color-separator-text: #d82466;
  --color-button-disabled-text: #98a6b3;
  --color-primary-active: #a81a4e;

  /* Spacing Scale (משותף לטופס וקומפוננטות) */
  --spacing-3xs: 2px;
  --spacing-2xs: 4px;
  --spacing-xs: 8px;
  --spacing-12: 12px;
  --spacing-sm: 16px;
  --spacing-md: 24px;
  --spacing-lg: 32px;
  --spacing-xl: 40px;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Typography */
  --font-primary: 'Assistant', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  --font-size-sm: clamp(0.875rem, 0.8vw + 0.7rem, 1rem);
  --font-size-base: clamp(0.9375rem, 0.9vw + 0.8rem, 1.0625rem);
  --font-size-lg: clamp(1.125rem, 1.2vw + 1rem, 1.25rem);
  --font-size-xl: clamp(1.25rem, 1.4vw + 1.1rem, 1.5rem);
  --font-size-2xl: clamp(1.5rem, 2vw + 1.3rem, 1.75rem);

  /* Border Radius */
  --radius-xs: 8px;
  --radius-sm: 10px;
  --radius-base: 0.25rem;
  --radius-md: 16px;
  --radius-lg: 18px;
  --radius-xl: 16px;
  --radius-2xl: 1rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.06);
  --shadow-base: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 14px 34px rgba(79, 139, 255, 0.22);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-primary: 0 2px 8px rgba(233, 75, 143, 0.15);
  --shadow-primary-md: 0 4px 12px rgba(29, 47, 92, 0.2);
  --shadow-primary-lg: 0 6px 16px rgba(233, 75, 143, 0.3);
  --shadow-primary-button: 0 4px 12px rgba(216, 36, 102, 0.3);
  --shadow-primary-button-active: 0 2px 4px rgba(216, 36, 102, 0.2);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.05);
  --shadow-card-hover: 0 4px 20px rgba(0, 0, 0, 0.1);

  /* Google / Calendar UI (שימוש ב-schedule-form ו-success screens) */
  --color-google-blue: #4285F4;
  --color-google-blue-alpha-20: rgba(66, 133, 244, 0.2);
  --color-google-red: #EA4335;
  --color-google-green: #34A853;
  --color-white-alpha-30: rgba(255, 255, 255, 0.3);

  /* Transitions */
  --transition-fast: all 0.15s ease-in-out;
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.3s ease-in-out;

  /* Z-Index */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
  --z-toast: 1080;
}

/* ========================================
   PLUGIN CONTAINERS - מיכלי הפלאגין
   ======================================== */

.clinic-queue-management,
.ap-widget,
.calendars-table-container,
.calendar-dialog,
.sync-overview,
.clinic-queue-dashboard,
.clinic-queue-cron-dashboard {
  font-family: var(--font-primary);
}

/* ========================================
   RTL SUPPORT - תמיכה ב-RTL
   ======================================== */

[dir="rtl"] {
  text-align: right;
}

[dir="ltr"] {
  text-align: left;
}

/* ========================================
   UTILITY CLASSES - מחלקות עזר
   ======================================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Scoped to our widget only to avoid affecting other plugins */
.appointments-calendar .focus-visible:focus-visible,
.ap-widget .focus-visible:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* ========================================
   ANIMATIONS - אנימציות
   ======================================== */

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { 
    opacity: 0;
    transform: translateY(10px);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   ADMIN - רקע דשבורד ועמודיו
   ======================================== */

body,
body.wp-admin #wpwrap {
  background-color: #f9f9fb !important;
}

/* ========================================
   PRESERVE DASHICONS - שמירה על אייקוני WordPress
   ======================================== */

#wpadminbar .ab-icon,
#wpadminbar .ab-item:before,
#wp-admin-bar-menu .ab-icon,
#wpadminbar .dashicons,
#wpadminbar [class^="dashicons"],
#wpadminbar [class*=" dashicons-"] {
  font-family: dashicons !important;
}
