/**
 * Fuller Faculty Commons Assistant
 * Blueprint-branded Canvas floating widget
 */

:root {
  --fc-navy: #072b31;
  --fc-sky: #00aec7;
  --fc-cream: #d6d2c4;
  --fc-midnight: #101820;
  --fc-denim: #005776;
  --fc-white: #ffffff;

  --fc-panel-width: 420px;
  --fc-header-height: 82px;
  --fc-transition: 220ms ease;
  --fc-shadow:
    0 18px 48px rgba(7, 43, 49, 0.24),
    0 4px 14px rgba(7, 43, 49, 0.15);
}

#fc-assistant-root {
  position: relative;
  z-index: 100000;
  font-family:
    Arial,
    Helvetica,
    sans-serif;
}

#fc-assistant-launcher {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100002;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;

  min-height: 52px;
  padding: 12px 18px;

  border: 2px solid transparent;
  border-radius: 999px;

  background: var(--fc-navy);
  color: var(--fc-white);

  box-shadow:
    0 8px 24px rgba(7, 43, 49, 0.28);

  font: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;

  cursor: pointer;
  transition:
    transform var(--fc-transition),
    background-color var(--fc-transition),
    box-shadow var(--fc-transition);
}

#fc-assistant-launcher:hover {
  background: var(--fc-denim);
  transform: translateY(-2px);
  box-shadow:
    0 11px 28px rgba(7, 43, 49, 0.32);
}

#fc-assistant-launcher:focus-visible {
  outline: 4px solid var(--fc-sky);
  outline-offset: 3px;
}

.fc-assistant-launcher-icon {
  display: flex;
  width: 24px;
  height: 24px;
}

.fc-assistant-launcher-icon svg,
.fc-assistant-header-icon svg,
.fc-assistant-close svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

#fc-assistant-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 100004;

  display: flex;
  flex-direction: column;

  width: min(
    var(--fc-panel-width),
    calc(100vw - 32px)
  );

  background: var(--fc-white);
  box-shadow: var(--fc-shadow);

  transform: translateX(105%);
  visibility: hidden;

  transition:
    transform var(--fc-transition),
    visibility var(--fc-transition);
}

.fc-assistant-is-open #fc-assistant-panel {
  transform: translateX(0);
  visibility: visible;
}

#fc-assistant-overlay {
  position: fixed;
  inset: 0;
  z-index: 100003;

  background: rgba(16, 24, 32, 0.42);
  opacity: 0;
  visibility: hidden;

  transition:
    opacity var(--fc-transition),
    visibility var(--fc-transition);
}

.fc-assistant-is-open #fc-assistant-overlay {
  opacity: 1;
  visibility: visible;
}

.fc-assistant-header {
  position: relative;
  flex: 0 0 auto;
  min-height: var(--fc-header-height);

  background: var(--fc-navy);
  color: var(--fc-white);
}

.fc-assistant-header-accent {
  height: 6px;
  background: var(--fc-sky);
}

.fc-assistant-header-content {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 13px 14px 13px 18px;
}

.fc-assistant-header-icon {
  display: flex;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  color: var(--fc-sky);
}

.fc-assistant-header-text {
  flex: 1 1 auto;
  min-width: 0;
}

.fc-assistant-title {
  margin-bottom: 3px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
}

.fc-assistant-subtitle {
  color: var(--fc-cream);
  font-size: 12px;
  line-height: 1.35;
}

.fc-assistant-close {
  display: flex;
  flex: 0 0 42px;
  align-items: center;
  justify-content: center;

  width: 42px;
  height: 42px;
  padding: 10px;

  border: 2px solid transparent;
  border-radius: 50%;

  background: transparent;
  color: var(--fc-white);

  cursor: pointer;
}

.fc-assistant-close:hover {
  background: rgba(255, 255, 255, 0.12);
}

.fc-assistant-close:focus-visible {
  outline: 3px solid var(--fc-sky);
  outline-offset: 1px;
}

.fc-assistant-frame-wrapper {
  flex: 1 1 auto;
  min-height: 0;
  background: var(--fc-white);
}

#fc-assistant-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--fc-white);
}

body.fc-assistant-prevent-scroll {
  overflow: hidden;
}

@media screen and (max-width: 600px) {
  :root {
    --fc-panel-width: 100vw;
  }

  #fc-assistant-panel {
    width: 100vw;
  }

  #fc-assistant-launcher {
    right: 14px;
    bottom: 14px;
    min-width: 52px;
    padding: 13px;
  }

  .fc-assistant-launcher-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  #fc-assistant-launcher,
  #fc-assistant-panel,
  #fc-assistant-overlay {
    transition: none;
  }
}