/*! 
 * yAccessibility v5.5 - Arabic Accessibility Widget (JS Only, External CSS)
 * Updated: Smart Contrast for Light/Dark Modes
 * Designed by Tareq Abuhajjaj
 * Contact: tzhajjaj@gmail.com
 * www.tareqdesign.com
 */

:root {
  --y-blue: #006DD5;
}

/* الزر الرئيسي */
#y-access-btn {
  position: fixed;
  left: 20px;
  bottom: 20px;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--y-blue), #004c9f);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  cursor: pointer;
  z-index: 99999;
  border: none;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  transition: all 0.25s ease;
}
#y-access-btn:hover {
  transform: scale(1.1) rotate(5deg);
}

/* اللوحة */
#y-panel {
  position: fixed;
  left: 20px;
  bottom: 90px; /* تظهر اللوحة فوق الزر */
  z-index: 99999;
  width: 300px;
  padding: 16px;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  box-shadow: 0 12px 35px rgba(0,0,0,0.25);
  display: none;
  font-family: 'Tajawal', sans-serif;
  user-select: none;
  overflow: hidden;      /* منع التمرير */
  max-height: 85vh;      /* تأكد من ألا يتجاوز الشاشة */
}
#y-panel.active {
  display: block;
}

/* الشبكة */
#y-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

/* عناصر الأزرار */
.y-item {
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #fff;
}
.y-item i {
  font-size: 24px;
  color: var(--y-blue);
  margin-bottom: 6px;
}
.y-item span {
  font-size: 13px;
  color: #333;
  text-align: center;
}
.y-item.active {
  background: var(--y-blue);
  border-color: var(--y-blue);
  color: #fff;
}
.y-item.active i {
  color: #fff;
}
.y-item.active span {
  color: #fff;
}
.y-item:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.shortcut {
  font-size: 11px;
  color: #666;
  margin-top: 2px;
}

/* تذييل اللوحة */
#y-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}
#y-reset,
#y-statement {
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}
#y-reset {
  background: #dfdfdf;
  border: 1px solid #ccc;
}
#y-reset:hover {
  background: #f7f7f7;
}
#y-statement {
  background: var(--y-blue);
  border: none;
  color: #fff;
  text-decoration: none;
}
#y-statement:hover {
  opacity: 0.9;
}

/* إعدادات الوصول */
.y-simple-font {
  font-family: "Arial", sans-serif !important;
  line-height: 1.6 !important;
}
.y-stop-anim * {
  animation: none !important;
  transition: none !important;
}

/* وضع التركيز */
#focus-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 99998;
  background: rgba(0, 0, 0, 0.6);
  transition: all 0.2s ease;
  display: none;
}

/* التباين والألوان */
#y-main.y-contrast {
  filter: invert(1) hue-rotate(180deg);
}
#y-main.y-grayscale {
  filter: grayscale(100%);
}
#y-main.y-highlight a {
  outline: 3px dashed var(--highlight-color, var(--y-blue));
  outline-offset: 3px;
}

.btn-download {
    padding: 10px;
    background-color: #515151;
    color: white;
    border-radius: 8px;
    display: block;
    text-align: center;
}

.btn-download:hover {
    padding: 10px;
    background-color: #323232;
    color: white;
    transition: .5s;

}
#y-close {
    padding: 8px;
    background-color: #286ed8;
    color: #fff;
    border-radius: 7px;
    font-size: 14px;
    min-width: 80px;
}