/* IB Software — promo, support, documentation */

/* Auth: fixed side dock (drawer expands on hover) */
.ib-side-dock {
  position: fixed;
  top: 50%;
  right: 0;
  z-index: 1080;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.35rem 0;
  pointer-events: none;
}

.ib-side-dock-item {
  pointer-events: auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end; /* icon stays visible on the right edge when collapsed */
  width: max-content;
  max-width: 2.75rem;
  height: 2.75rem;
  margin-left: auto;
  overflow: hidden;
  text-decoration: none !important;
  color: #fff !important;
  background: var(--app-primary, #696cff);
  border-radius: 0.65rem 0 0 0.65rem;
  box-shadow: 0 0.35rem 0.9rem rgba(67, 89, 113, 0.22);
  transition: max-width 0.28s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.ib-side-dock-item:hover,
.ib-side-dock-item:focus-visible {
  max-width: 17rem;
  background: var(--app-primary-hover, #5f61e6);
  box-shadow: 0 0.45rem 1.1rem rgba(67, 89, 113, 0.3);
  outline: none;
}

.ib-side-dock-icon {
  flex: 0 0 2.75rem;
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.ib-side-dock-icon i {
  font-size: 1.05rem !important;
  line-height: 1 !important;
  color: #fff !important;
  display: inline-block;
  width: auto;
  height: auto;
}

.ib-side-dock-label {
  flex: 0 1 auto;
  padding: 0 0.25rem 0 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  color: #fff !important;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.ib-side-dock-item:hover .ib-side-dock-label,
.ib-side-dock-item:focus-visible .ib-side-dock-label {
  opacity: 1;
}

/* Auth: powered-by under login button */
.ib-powered-by {
  margin-top: 0.85rem;
  text-align: center;
}

.ib-powered-by-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: #8a97a8 !important;
  text-decoration: none !important;
}

.ib-powered-by-link i {
  font-size: 0.95rem !important;
  line-height: 1 !important;
  color: var(--app-primary, #696cff) !important;
}

.ib-powered-by-link strong {
  color: #566a7f;
  font-weight: 700;
}

.ib-powered-by-link:hover {
  color: var(--app-primary, #696cff) !important;
}

.ib-powered-by-link:hover strong {
  color: var(--app-primary, #696cff);
}

html.dark-style .ib-powered-by-link {
  color: var(--app-muted, #9d9d9d) !important;
}

html.dark-style .ib-powered-by-link strong {
  color: var(--app-heading, #f3f3f3);
}

@media (max-width: 575.98px) {
  .ib-side-dock {
    top: auto;
    bottom: 1rem;
    transform: none;
  }

  .ib-side-dock-item:hover,
  .ib-side-dock-item:focus-visible {
    max-width: 12.5rem;
  }
}

/* Documentation / Support — VVIP library (no embedded PDF black box) */
.ib-doc-page {
  padding-bottom: 1.5rem;
}

.ib-doc-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  padding: 1.25rem 1.35rem;
  border-radius: 0.85rem;
  background:
    linear-gradient(135deg, rgba(var(--app-primary-rgb, 105, 108, 255), 0.12) 0%, rgba(255, 255, 255, 0.9) 48%, #f7f8fc 100%);
  border: 1px solid rgba(var(--app-primary-rgb, 105, 108, 255), 0.18);
  box-shadow: 0 0.35rem 1rem rgba(67, 89, 113, 0.06);
}

.ib-doc-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--app-primary, #696cff);
}

.ib-doc-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: #2f3b4c;
  letter-spacing: -0.02em;
}

.ib-doc-subtitle {
  max-width: 38rem;
  color: #697a8d;
  font-size: 0.9rem;
  line-height: 1.45;
}

.ib-doc-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.ib-doc-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: #8a97a8;
}

.ib-doc-dot {
  opacity: 0.5;
}

.ib-doc-tile {
  display: flex;
  flex-direction: column;
  padding: 1.1rem 1.15rem 1rem;
  border-radius: 0.85rem;
  background: #fff;
  border: 1px solid #e7ecf1;
  box-shadow: 0 0.2rem 0.65rem rgba(67, 89, 113, 0.05);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.ib-doc-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--app-primary-rgb, 105, 108, 255), 0.35);
  box-shadow: 0 0.65rem 1.4rem rgba(67, 89, 113, 0.1);
}

.ib-doc-tile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.ib-doc-tile-icon {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--app-primary-rgb, 105, 108, 255), 0.12);
  color: var(--app-primary, #696cff);
  font-size: 1.35rem;
}

.ib-doc-tile-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--app-primary, #696cff);
  background: rgba(var(--app-primary-rgb, 105, 108, 255), 0.1);
  border: 1px solid rgba(var(--app-primary-rgb, 105, 108, 255), 0.2);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
}

.ib-doc-tile-code {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #2f3b4c;
}

.ib-doc-tile-name {
  margin: 0.15rem 0 0.45rem;
  font-size: 0.9rem;
  color: #566a7f;
}

.ib-doc-tile-file {
  margin: 0 0 0.9rem;
  font-size: 0.72rem;
  color: #9aa5b5;
  word-break: break-all;
}

.ib-doc-tile-foot {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  padding-top: 0.75rem;
  border-top: 1px solid #eef1f5;
}

.ib-doc-tile-size {
  font-size: 0.75rem;
  color: #8a97a8;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.ib-doc-tile-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.ib-doc-empty {
  border: 1px dashed #d4d8e0;
  border-radius: 0.85rem;
}

.ib-doc-empty-icon {
  font-size: 2.75rem;
  color: #b0b7c3;
}

.ib-doc-card,
.ib-support-card {
  border: 1px solid rgba(105, 108, 255, 0.18);
  overflow: hidden;
}

html.dark-style .ib-doc-hero {
  background: linear-gradient(135deg, rgba(var(--app-primary-rgb, 105, 108, 255), 0.18) 0%, #2d2d30 55%, #252526 100%);
  border-color: var(--app-border, #555555);
  box-shadow: none;
}

html.dark-style .ib-doc-title,
html.dark-style .ib-doc-tile-code {
  color: var(--app-heading, #f3f3f3);
}

html.dark-style .ib-doc-subtitle,
html.dark-style .ib-doc-tile-name,
html.dark-style .ib-doc-meta,
html.dark-style .ib-doc-tile-size,
html.dark-style .ib-doc-tile-file {
  color: var(--app-muted, #9d9d9d);
}

html.dark-style .ib-doc-tile {
  background: var(--app-surface, #252526);
  border-color: var(--app-border, #555555);
  box-shadow: none;
}

html.dark-style .ib-doc-tile:hover {
  border-color: rgba(var(--app-primary-rgb, 105, 108, 255), 0.45);
  box-shadow: 0 0.5rem 1.2rem rgba(0, 0, 0, 0.35);
}

html.dark-style .ib-doc-tile-foot {
  border-top-color: var(--app-border, #555555);
}

html.dark-style .ib-doc-empty {
  background: var(--app-surface, #252526);
  border-color: var(--app-border, #555555);
}

.ib-contact-list li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.65rem;
  font-size: 0.95rem;
}

.ib-contact-list i {
  color: var(--app-primary, #696cff);
  font-size: 1.15rem;
}

/* Footer support strip */
.ib-footer-support {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.85rem;
  font-size: 0.8rem;
}

.ib-footer-support a {
  white-space: nowrap;
}

.ib-footer-support .ib-dot {
  opacity: 0.45;
}

/* Complaint widget IB strip */
.ib-widget-support {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 0.65rem;
  margin-top: 0.65rem;
  font-size: 0.75rem;
  color: #a0a8c0;
}

.ib-widget-support a {
  color: #c5c9ff !important;
}
