/* ===== Copilot Side Pane ===== */

.side-pane {
  width: 0;
  overflow: hidden;
  transition: width 0.5s cubic-bezier(0.32, 0.72, 0, 1);
  will-change: width;
  flex-shrink: 0;
  background: #f4f7fb;
}

.content-area.pane-open .side-pane {
  width: 360px;
}

.side-pane-inner {
  width: 360px;
  min-width: 360px;
  height: 100%;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.4s ease-out 0.15s, transform 0.4s ease-out 0.15s;
  background: linear-gradient(180deg,
    rgba(248, 244, 242, 0) 0%,
    #f8f4f2 50%,
    #fdedde 100%
  );
  position: relative;
}

.content-area.pane-open .side-pane-inner {
  opacity: 1;
  transform: translateX(0);
}

/* --- Side Pane Header (48px) --- */
.sp-header {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  min-height: 48px;
  flex-shrink: 0;
  position: relative;
}

.sp-header-left {
  position: absolute;
  left: 16px;
  display: flex;
  align-items: center;
}

.sp-header-center {
  display: flex;
  align-items: center;
  gap: 0;
}

.sp-copilot-icon {
  display: none;
}

.sp-header-title {
  font-family: var(--font-ui-sans);
  font-size: 17px;
  font-weight: 600;
  color: #242424;
  letter-spacing: -0.43px;
  line-height: 22px;
}

.sp-header-right {
  position: absolute;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.sp-settings-btn {
  width: 24px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(0,0,0,0.86);
  padding: 0;
}

@media (hover: hover) and (pointer: fine) {
  .sp-settings-btn:hover {
    opacity: 0.7;
  }
}

.sp-settings-btn svg,
.sp-settings-btn img {
  width: 20px;
  height: 20px;
}

.sp-close {
  width: 24px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(0,0,0,0.86);
  padding: 0;
}

@media (hover: hover) and (pointer: fine) {
  .sp-close:hover {
    opacity: 0.7;
  }
}

.sp-close svg {
  width: 22px;
  height: 22px;
}

/* --- Chat Messages --- */
.sp-chat {
  flex: 1;
  overflow-y: auto;
  padding: 24px 30px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sp-msg {
  display: flex;
  flex-direction: column;
}

/* User message — right aligned */
.sp-msg-user {
  align-items: flex-end;
  padding-left: 40px;
}

.sp-msg-bubble {
  background: #fee5ce;
  padding: 14px 20px;
  border-radius: 16px;
  font-family: var(--font-ui-sans);
  font-size: 17px;
  font-weight: 410;
  line-height: 26px;
  color: #1d1b1a;
}

/* AI message — left aligned */
.sp-msg-ai {
  align-items: flex-start;
}

.sp-msg-content {
  font-family: var(--font-ui-sans);
  font-size: 17px;
  font-weight: 410;
  line-height: 26px;
  color: #33302e;
  width: 300px;
}

.sp-msg-content p {
  margin-bottom: 16px;
}

.sp-msg-content p:last-child {
  margin-bottom: 0;
}

.sp-msg-content strong {
  font-weight: 700;
}

.sp-msg-content ul {
  margin: 0 0 16px 0;
  list-style-type: disc;
}

.sp-msg-content li {
  margin-bottom: 0;
  margin-left: 25.5px;
  font-size: 17px;
  line-height: 26px;
}

.sp-msg-content ol {
  margin: 0 0 16px 0;
}

.sp-msg-content ol li {
  margin-left: 25.5px;
}

/* Typing cursor */
.sp-cursor {
  display: inline-block;
  width: 2px;
  height: 18px;
  background: #272320;
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 0.8s infinite;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* --- Suggestions --- */
.sp-suggestions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  padding: 0 30px;
  flex-shrink: 0;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  width: 300px;
  margin: 0 auto;
}

.sp-suggestions.visible {
  opacity: 1;
  transform: translateY(0);
}

.sp-chip {
  padding: 10px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid #b1aaa6;
  border-radius: 12px;
  font-family: var(--font-ui-sans);
  font-size: 15px;
  font-weight: 410;
  color: #33302e;
  line-height: 20px;
  cursor: pointer;
  transition: background 0.15s;
  max-width: 100%;
}

@media (hover: hover) and (pointer: fine) {
  .sp-chip:hover {
    background: rgba(0,0,0,0.03);
  }
}

/* --- Explore this page section --- */
.sp-explore {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0 30px;
  width: 300px;
  margin: 0 auto;
}

.sp-explore-title {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}

.sp-explore-favicon {
  width: 32px;
  height: 32px;
  border-radius: 36px;
  background: rgba(255,255,255,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 1px rgba(0,0,0,0.08);
}

.sp-explore-favicon img {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

.sp-explore-title span {
  font-family: var(--font-ui-sans);
  font-size: 20px;
  font-weight: 410;
  color: #282523;
  line-height: 26px;
}

.sp-explore-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px;
  height: 80px;
  background: rgba(255,255,255,0.8);
  border-radius: 24px;
  box-shadow: 0 1px 1px rgba(0,0,0,0.08);
  cursor: pointer;
  transition: background 0.15s;
}

@media (hover: hover) and (pointer: fine) {
  .sp-explore-card:hover {
    background: rgba(255,255,255,0.95);
  }
}

.sp-explore-card-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: #33302e;
}

.sp-explore-card-icon svg {
  width: 24px;
  height: 24px;
}

.sp-explore-card-text {
  font-family: var(--font-ui-sans);
  font-size: 18px;
  font-weight: 410;
  color: #33302e;
  line-height: 26px;
  letter-spacing: -0.18px;
}

/* --- Composer --- */
.sp-composer {
  position: relative;
  padding: 0 16px 32px;
  flex-shrink: 0;
}

.sp-composer-inner {
  display: flex;
  align-items: center;
  height: 64px;
  padding: 9px;
  background: rgba(255, 253, 251, 0.6);
  border: 1px solid #fff;
  border-radius: 28px;
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  box-shadow: 0 16px 24px -2px rgba(0,0,0,0.12);
}

/* Left button group */
.sp-composer-left {
  display: flex;
  align-items: center;
  padding: 0 4px;
  flex-shrink: 0;
}

.sp-composer-btn {
  width: 40px;
  height: 48px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #33302e;
  flex-shrink: 0;
  border-radius: 20px;
}

@media (hover: hover) and (pointer: fine) {
  .sp-composer-btn:hover {
    background: rgba(0,0,0,0.04);
  }
}

.sp-composer-btn svg {
  width: 24px;
  height: 24px;
}

.sp-composer-btn.sp-copilot-btn {
  width: 40px;
}

.sp-composer-btn.sp-copilot-btn svg {
  width: 24px;
  height: 24px;
}

/* Composer input field */
.sp-composer-field {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: #FFFFFF;
  border-radius: 20px;
  min-width: 0;
}

.sp-composer-placeholder {
  font-family: var(--font-ui-sans);
  font-size: 17px;
  font-weight: 410;
  color: #635d5a;
  line-height: 26px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Right button group */
.sp-composer-right {
  display: flex;
  align-items: center;
  padding: 0 4px;
  flex-shrink: 0;
}
