/* Side Dock Container - Uses inset-inline-end to pin to the end edge (LEFT in RTL) */
.side-dock {
  position: fixed;
  inset-inline-end: 0; 
  top: 50%;
  transform: translateY(-50%) translateX(0);
  display: flex;
  align-items: center;
  z-index: 1000;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Toggle Arrow Button */
.toggle-btn {
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  width: 28px;
  height: 80px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #111;
  font-size: 13px;
  outline: none;
}

/* RTL-Specific Adjustments for Toggle Button & Panel */
html[dir="rtl"] .side-dock.closed {
  /* Translate negative (-100px) to slide off the LEFT edge in RTL */
  transform: translateY(-50%) translateX(-100px);
}

html[dir="rtl"] .toggle-btn {
  border-left: none;
  border-radius: 0 10px 10px 0;
  box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
}

html[dir="rtl"] .dock-content {
  border-radius: 0 16px 16px 0;
  box-shadow: 8px 0 25px rgba(0, 0, 0, 0.15);
}

/* Arrow rotation rules for RTL */
html[dir="rtl"] .side-dock .arrow-icon {
  transform: rotate(180deg); /* Points LEFT (←) when open */
}

html[dir="rtl"] .side-dock.closed .arrow-icon {
  transform: rotate(0deg); /* Points RIGHT (→) when closed */
}

.toggle-btn .arrow-icon {
  display: inline-block;
  transition: transform 0.4s ease;
}

/* Menu Panel */
.dock-content {
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  width: 100px;
  padding: 20px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Navigation Items */
.dock-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: #1a1a1a;
  width: 100%;
  padding: 10px 4px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.dock-item:hover {
  transform: translateY(-2px);
  opacity: 0.8;
}

.dock-item i {
  font-size: 22px;
  margin-bottom: 6px;
}

.dock-item span {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
}

/* Separators */
.dock-item:not(:last-of-type)::after,
.divider {
  content: "";
  display: block;
  width: 85%;
  height: 1px;
  background: rgba(0, 0, 0, 0.15);
  margin-top: 10px;
}

/* Social Media Section */
.social-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  width: 100%;
}

.social-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1a1a1a;
  text-decoration: none;
  font-size: 13px;
  transition: all 0.2s ease;
}

.social-icon:hover {
  background: rgba(0, 0, 0, 0.1);
  transform: scale(1.08);
}


/* Compact panel width */
.dock-content {
  width: 60px;
  padding: 20px 0;
}

/* Set position relative on items for tooltip placement */
.dock-item {
  position: relative;
}

/* Convert text into a floating tooltip */
.dock-item span {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 10;
}

/* RTL Placement: Position tooltip to the right of the icon */
html[dir="rtl"] .dock-item span {
  left: 110%; /* Displays tooltip to the right side of the dock */
}

/* LTR Placement: Position tooltip to the left of the icon */
html:not([dir="rtl"]) .dock-item span {
  left: 110%;
}

/* Reveal tooltip on hover */
.dock-item:hover span {
  opacity: 1;
}

/* Adjust closed state offset for 60px panel width */
html[dir="rtl"] .side-dock.closed {
  transform: translateY(-50%) translateX(-60px);
}