/* Typography System - Enterprise V9 */
/* מאוחד מ-base.css ו-design-system/typography.css */

@layer base {
/* Font Face Imports */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Base Typography - מאוחד מ-base.css */
html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: var(--font-family-sans);
  font-size: 16px;
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: visible;
  overflow-y: auto;
  width: 100%;
  max-width: 100%;
}

body {
  font-size: var(--text-base);
  font-weight: var(--font-normal);
  color: var(--text-primary);
  background-color: var(--bg-secondary);
}

/* שכל הדפים לא ישימו לעצמם רקע לבן - מאוחד מ-base.css */
main,
.app,
#main,
[role="main"],
[class$="-page"],
[class*="page-wrapper"],
.dashboard-page,
.projects-page,
.employees-page,
.contractors-page,
.suppliers-page,
.materials-page,
.documents-page,
.contracts-page,
.worklogs-page,
.reports-page {
  background: transparent;
  color: var(--text-primary);
  overflow-x: visible;
  overflow-y: visible;
  width: 100%;
  max-width: 100%;
  margin-inline: 0;
  margin-top: 0;
  padding-inline: 0;
  padding-top: 0;
  height: auto;
  min-height: auto;
}

/* Scrollbar - מאוחד מ-base.css */
body::-webkit-scrollbar {
  width: 10px;
}
body::-webkit-scrollbar-track {
  background: var(--secondary-100);
}
body::-webkit-scrollbar-thumb {
  background: var(--secondary-400);
  border-radius: var(--radius-full);
}
body::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-500);
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-semibold);
  line-height: var(--leading-tight);
  color: var(--text-primary);
  margin: 0;
}

h1 {
  font-size: var(--text-4xl);
  font-weight: var(--font-bold);
  line-height: 1.1;
}

h2 {
  font-size: var(--text-3xl);
  font-weight: var(--font-semibold);
  line-height: 1.2;
}

h3 {
  font-size: var(--text-2xl);
  font-weight: var(--font-semibold);
  line-height: 1.25;
}

h4 {
  font-size: var(--text-xl);
  font-weight: var(--font-medium);
  line-height: 1.3;
}

h5 {
  font-size: var(--text-lg);
  font-weight: var(--font-medium);
  line-height: 1.4;
}

h6 {
  font-size: var(--text-base);
  font-weight: var(--font-medium);
  line-height: 1.5;
}

/* Paragraphs */
p {
  margin: 0 0 var(--space-4) 0;
  line-height: var(--leading-relaxed);
  color: var(--text-primary);
}

p:last-child {
  margin-bottom: 0;
}

/* Text Utilities */
.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }
.text-3xl { font-size: var(--text-3xl); }
.text-4xl { font-size: var(--text-4xl); }

/* Font Weight Utilities */
.font-light { font-weight: var(--font-light); }
.font-normal { font-weight: var(--font-normal); }
.font-medium { font-weight: var(--font-medium); }
.font-semibold { font-weight: var(--font-semibold); }
.font-bold { font-weight: var(--font-bold); }

/* Text Color Utilities */
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }
.text-inverse { color: var(--text-inverse); }

.text-success { color: var(--success-600); }
.text-warning { color: var(--warning-600); }
.text-error { color: var(--error-600); }
.text-info { color: var(--info-600); }

/* Text Alignment */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-justify { text-align: justify; }

/* RTL Text Alignment */
[dir="rtl"] .text-left { text-align: right; }
[dir="rtl"] .text-right { text-align: left; }

.text-start { text-align: var(--text-align-start); }
.text-end { text-align: var(--text-align-end); }

/* Line Height Utilities */
.leading-tight { line-height: var(--leading-tight); }
.leading-normal { line-height: var(--leading-normal); }
.leading-relaxed { line-height: var(--leading-relaxed); }

/* Text Decoration */
.underline { text-decoration: underline; }
.no-underline { text-decoration: none; }

/* Text Transform */
.uppercase { text-transform: uppercase; }
.lowercase { text-transform: lowercase; }
.capitalize { text-transform: capitalize; }
.normal-case { text-transform: none; }

/* Links - מאוחד מ-base.css */
a {
  color: var(--primary-600);
  text-decoration: none;
  transition: color var(--transition-fast), opacity var(--transition-fast);
}

a:hover {
  color: var(--primary-700);
  text-decoration: underline;
}

a:focus {
  outline: 2px solid var(--primary-500);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* תיקון: קישורים בתוך dropdown menus - מאוחד מ-base.css */
.dropdown-menu {
  --bs-dropdown-link-color: var(--text-secondary);
}
.dropdown-menu a,
.dropdown-menu a.mega-link {
  color: var(--text-secondary);
}
.premium-navbar .dropdown-menu.mega-menu {
  --bs-dropdown-link-color: var(--text-secondary);
}
.premium-navbar .dropdown-menu.mega-menu a,
.premium-navbar .dropdown-menu.mega-menu a.mega-link {
  color: var(--text-secondary);
}

/* קישורים בתוך כרטיסים וטבלאות - מאוחד מ-base.css */
.entity-card a,
.table a,
.employees-table a,
.contracts-table a {
  font-weight: var(--font-medium);
}

/* Lists - מאוחד מ-base.css */
ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Images - מאוחד מ-base.css */
img, video {
  max-inline-size: 100%;
  block-size: auto;
  display: block;
}

/* Form Elements - מאוחד מ-base.css */
input, textarea, select, button {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

/* Focus Styles - מאוחד מ-base.css */
*:focus {
  outline: 2px solid var(--primary-500);
  outline-offset: 2px;
}

*:focus:not(:focus-visible) {
  outline: none;
}

/* Code */
code {
  font-family: var(--font-family-mono);
  font-size: 0.875em;
  background-color: var(--secondary-100);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
}

pre {
  font-family: var(--font-family-mono);
  background-color: var(--secondary-100);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  margin: var(--space-4) 0;
}

pre code {
  background: none;
  padding: 0;
}

/* Blockquotes */
blockquote {
  border-inline-start: 4px solid var(--primary-500);
  padding-inline-start: var(--space-4);
  margin: var(--space-4) 0;
  font-style: italic;
  color: var(--text-secondary);
}

[dir="rtl"] blockquote {
  border-inline-start: none;
  border-inline-end: 4px solid var(--primary-500);
  padding-inline-start: 0;
  padding-inline-end: var(--space-4);
}

/* Small Text */
small {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* Strong and Bold */
strong, b {
  font-weight: var(--font-semibold);
}

/* Emphasis */
em, i {
  font-style: italic;
}

/* Mark/Highlight */
mark {
  background-color: var(--warning-100);
  color: var(--warning-800);
  padding: 0 var(--space-1);
  border-radius: var(--radius-sm);
}

/* Abbreviations */
abbr[title] {
  text-decoration: underline dotted;
  cursor: help;
}

/* Selection */
::selection {
  background-color: var(--primary-100);
  color: var(--primary-900);
}

/* Responsive Typography */
@media (max-width: 640px) {
  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }
  h3 { font-size: var(--text-xl); }
  h4 { font-size: var(--text-lg); }
  h5 { font-size: var(--text-base); }
  h6 { font-size: var(--text-sm); }
}

/* Footer - מאוחד מ-base.css */
.omar-footer {
  background: var(--bg-surface);
  padding: var(--space-6) var(--space-4);
  text-align: center;
  margin-top: var(--space-12);
  border-top: 1px solid var(--border-subtle);
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.04);
  position: relative;
  width: 100%;
  z-index: 100;
}

.omar-footer .footer-container {
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  position: relative;
}

.omar-footer .footer-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  color: var(--text-main);
  font-size: var(--text-base);
  font-weight: var(--font-medium);
}

.omar-footer .footer-text {
  color: var(--text-main);
  font-weight: var(--font-medium);
}

.omar-footer .footer-copyright {
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.omar-footer .footer-heart,
.omar-footer .ri-heart-fill {
  color: var(--error-500);
  font-size: 1.1em;
  vertical-align: middle;
  animation: heartbeat 2s ease-in-out infinite;
}

@keyframes heartbeat {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* תפריט בחירת עיצוב ב-footer - קטן מאוד */
.omar-footer .footer-theme-selector {
  position: absolute;
  inset-inline-start: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
}

.omar-footer .footer-theme-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: var(--text-base);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.omar-footer .footer-theme-btn:hover {
  background: var(--primary-soft);
  border-color: var(--primary-300);
  color: var(--primary-600);
  transform: scale(1.05);
}

.omar-footer .footer-theme-btn:focus {
  outline: 2px solid var(--primary-500);
  outline-offset: 2px;
}

.omar-footer .footer-theme-btn i {
  font-size: 1rem;
}

.omar-footer .footer-theme-dropdown {
  position: absolute;
  bottom: calc(100% + var(--space-2));
  inset-inline-start: 0;
  min-width: 140px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: var(--space-1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity var(--transition-base), visibility var(--transition-base), transform var(--transition-base);
  z-index: var(--z-dropdown);
}

.omar-footer .footer-theme-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.omar-footer .footer-theme-option {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition-fast);
  font-size: var(--text-sm);
  color: var(--text-main);
}

.omar-footer .footer-theme-option:hover {
  background: var(--primary-soft);
}

.omar-footer .footer-theme-option.active {
  background: var(--primary-soft-strong);
  color: var(--primary-700);
}

.omar-footer .footer-theme-option i {
  font-size: 1rem;
  width: 16px;
  text-align: center;
}

.omar-footer .footer-theme-option span {
  flex: 1;
}

/* RTL Support */
html[dir="rtl"] .omar-footer .footer-theme-selector {
  left: var(--space-4);
  right: auto;
}

html[dir="ltr"] .omar-footer .footer-theme-selector {
  right: var(--space-4);
  left: auto;
}

html[dir="rtl"] .omar-footer .footer-theme-dropdown {
  right: 0;
  left: auto;
}

html[dir="ltr"] .omar-footer .footer-theme-dropdown {
  left: 0;
  right: auto;
}

/* Page Header - מאוחד מ-base.css */
.page-header {
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  /* הסרת border כבד - החלפה במרווח */
}

.page-header-title {
  font-size: var(--text-2xl);
  color: var(--text-primary);
}

.page-header-subtitle {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* Print Styles */
@media print {
  body {
    font-size: 12pt;
    line-height: 1.4;
    color: black;
    background: var(--surface-50);
    color: var(--secondary-900);
  }
  
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
    color: black;
  }
  
  p {
    orphans: 3;
    widows: 3;
  }
  
  a {
    color: black;
    text-decoration: underline;
  }
}

/* Responsive - מאוחד מ-base.css */
@media (max-width: 768px) {
  .omar-footer {
    padding: var(--space-4) var(--space-3);
  }
  
  .omar-footer .footer-content {
    font-size: var(--text-sm);
    gap: var(--space-1);
  }
  
  .omar-footer .footer-theme-selector {
    position: static;
    transform: none;
    margin-top: var(--space-3);
    display: flex;
    justify-content: center;
  }
  
  .omar-footer .footer-theme-dropdown {
    bottom: auto;
    top: calc(100% + var(--space-2));
    inset-inline-start: 50%;
    transform: translateX(-50%) translateY(4px);
  }
  
  .omar-footer .footer-theme-dropdown.show {
    transform: translateX(-50%) translateY(0);
  }
}
} /* סיום @layer base */
