/*
 * شبکه یار (Shabake Yar) - Dedicated Stylesheet
 * Designed by SiteFaa (www.sitefaa.ir)
 * Mode: floating | Position: bottom-right
 */

/* ===== فونت فارسی وزیر (Vazir Font) ===== */
/* فایل‌های فونت را در پوشه fonts در ریشه پلاگین قرار دهید */
@font-face {
  font-family: 'Vazir';
  src: url('../../fonts/Vazir.woff2') format('woff2'),
       url('../../fonts/Vazir.woff') format('woff'),
       url('../../fonts/Vazir.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Vazir';
  src: url('../../fonts/Vazir-Bold.woff2') format('woff2'),
       url('../../fonts/Vazir-Bold.woff') format('woff'),
       url('../../fonts/Vazir-Bold.ttf') format('truetype');
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Vazir';
  src: url('../../fonts/Vazir-Medium.woff2') format('woff2'),
       url('../../fonts/Vazir-Medium.woff') format('woff'),
       url('../../fonts/Vazir-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Vazir';
  src: url('../../fonts/Vazir-Light.woff2') format('woff2'),
       url('../../fonts/Vazir-Light.woff') format('woff'),
       url('../../fonts/Vazir-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

:root {
  --sy-primary-bg: #4F46E5;
  --sy-primary-text: #FFFFFF;
  --sy-widget-bg: #1E293B;
  --sy-widget-border: #334155;
  --sy-item-bg: #2A374D;
  --sy-item-text: #FFFFFF;
  --sy-item-hover: #3B82F6;
  --sy-badge-bg: #10B981;
  --sy-badge-text: #FFFFFF;
}

.shabake-yar-wrapper {
  direction: rtl;
  font-family: 'Vazir', 'Vazirmatn', Tahoma, sans-serif;
  box-sizing: border-box;
}

.shabake-yar-wrapper * {
  box-sizing: inherit;
  font-family: 'Vazir', 'Vazirmatn', Tahoma, sans-serif;
}

/* Icon & info wrappers (new markup) */
.sy-item-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.sy-item-icon svg { width: 60%; height: 60%; fill: currentColor; }
.sy-item-info { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.sy-item.sy-icon-only { justify-content: center; }
.sy-trigger-btn.sy-trigger-icononly { padding: 14px; }
.sy-close-float { position: absolute; top: 8px; left: 8px; z-index: 5; background: transparent; border: none; font-size: 20px; cursor: pointer; }
.shabake-yar-wrapper.sy-hidden .sy-floating-container,
.shabake-yar-wrapper.sy-hidden .sy-edge-container { opacity: 0; visibility: hidden; transform: translateY(20px); transition: all .3s ease; }

/* Edge sidebar tab & drawer */
.sy-edge-container { display: flex; align-items: flex-start; }
.shabake-yar-wrapper.pos-left .sy-edge-container { flex-direction: row-reverse; }
.sy-edge-tab {
  writing-mode: vertical-rl;
  border: none;
  cursor: pointer;
  padding: 16px 10px;
  font-weight: bold;
  font-family: inherit;
  font-size: 14px;
  border-radius: 14px 0 0 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  letter-spacing: 1px;
}
.sy-edge-container.pos-left .sy-edge-tab { border-radius: 0 14px 14px 0; }
.sy-edge-drawer {
  width: 280px;
  padding: 16px;
  border: 1px solid;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}
.sy-drawer-title { font-weight: bold; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid; }
.sy-edge-drawer .sy-item { margin-bottom: 8px; }

.sy-inline-powered {
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(148,163,184,0.2);
}
.sy-inline-powered a, .sy-powered-by a { color: #6366f1; font-weight: bold; text-decoration: none; }
.sy-card-title { font-weight: bold; margin: 6px 0 4px; }
.sy-card-sub { font-size: 12px; opacity: 0.75; margin: 0; }
.sy-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }

/* Floating Positioning */
.sy-floating-container {
  position: fixed;
  z-index: 99999;
}

.shabake-yar-wrapper.pos-bottom-right .sy-floating-container {
  bottom: 24px;
  right: 24px;
}

.shabake-yar-wrapper.pos-bottom-left .sy-floating-container {
  bottom: 24px;
  left: 24px;
}

.shabake-yar-wrapper.pos-top-right .sy-floating-container {
  top: 24px;
  right: 24px;
}

.shabake-yar-wrapper.pos-top-left .sy-floating-container {
  top: 24px;
  left: 24px;
}

/* Trigger Button */
.sy-trigger-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: #4F46E5;
  color: #ffffff;
  border: none;
  border-radius: 50px;
  padding: 14px 22px;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(79, 70, 229, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sy-trigger-btn:hover {
  transform: translateY(-3px) scale(1.03);
}

.sy-pulse {
  animation: sy-pulse-anim 2s infinite;
}

@keyframes sy-pulse-anim {
  0% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.6); }
  70% { box-shadow: 0 0 0 16px rgba(79, 70, 229, 0); }
  100% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0); }
}

/* Floating Panel */
.sy-floating-panel {
  width: auto;
  max-height: 520px;
  overflow-y: auto;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  margin-bottom: 16px;
  padding: 18px;
  transition: all 0.3s ease;
}

.sy-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sy-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sy-online-dot {
  width: 10px;
  height: 10px;
  background: #10B981;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px #10B981;
}

.sy-panel-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 20px;
  cursor: pointer;
}

/* Social Items List */
.sy-panel-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sy-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  color: #f8fafc;
  text-decoration: none;
  transition: all 0.25s ease;
}

.sy-item:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateX(-4px);
}

.sy-item-name {
  font-weight: 600;
  font-size: 14px;
}

.sy-item-sub {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
}

.sy-badge {
  margin-right: auto;
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 8px;
  font-weight: bold;
}

/* Welcome Bubble */
.sy-welcome-bubble {
  position: absolute;
  bottom: 75px;
  right: 0;
  width: 280px;
  background: #fff;
  color: #0f172a;
  padding: 16px;
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.25);
  border: 1px solid #e2e8f0;
}

.sy-close-bubble {
  position: absolute;
  top: 8px;
  left: 12px;
  cursor: pointer;
  color: #64748b;
  font-size: 16px;
}

/* Inline Grid */
.sy-inline-grid {
  display: grid;
  gap: 16px;
}

.sy-inline-grid.cols-1 { grid-template-columns: 1fr; }
.sy-inline-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.sy-inline-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.sy-inline-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) {
  .sy-inline-grid.cols-3,
  .sy-inline-grid.cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.sy-inline-card {
  display: flex;
  flex-direction: column;
  padding: 20px;
  border-radius: 16px;
  background: #1e293b;
  border: 1px solid rgba(255,255,255,0.08);
  color: #fff;
  text-decoration: none;
  transition: all 0.3s ease;
}

.sy-inline-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

.sy-powered-by {
  text-align: center;
  font-size: 11px;
  color: #64748b;
  margin-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 10px;
}

.sy-powered-by a {
  color: #6366f1;
  font-weight: bold;
  text-decoration: none;
}
