/* Framework Advisor Styles */

/* Default state */
.mf-advisor-default {
  max-width: 720px;
  margin: 60px auto;
  padding: 0 24px;
  text-align: center;
}

.mf-advisor-default__title {
  font-size: 38px;
  font-weight: 700;
  color: rgba(17, 24, 39, 0.9);
  margin: 0 0 16px;
  line-height: 1.2;
}

.mf-advisor-default__subtitle {
  font-size: 17px;
  color: rgba(17, 24, 39, 0.7);
  margin: 0 0 40px;
  line-height: 1.6;
  text-align: left;
}

.mf-advisor-default__input-row {
  margin-bottom: 32px;
}

.mf-advisor-default__input-wrapper {
  position: relative;
  border-radius: 12px;
  padding: 2px;
  background: linear-gradient(135deg, #7c3aed 0%, #ec4899 100%);
  transition: opacity 0.2s;
  overflow: hidden;
  display: block;
  box-sizing: border-box;
}

.mf-advisor-default__input-wrapper:focus-within {
  opacity: 1;
}

.mf-advisor-default__textarea {
  width: 100%;
  min-height: 80px;
  max-height: 300px;
  padding: 12px 50px 12px 16px;
  margin: 0;
  border: none;
  border-radius: calc(12px - 2px);
  font-size: 15px;
  font-family: inherit;
  resize: none;
  outline: none;
  background: #fff;
  box-sizing: border-box;
  overflow-y: auto;
  line-height: 1.5;
  display: block;
}

.mf-advisor-default__textarea::placeholder {
  color: rgba(17, 24, 39, 0.45);
}

.mf-advisor-default__send {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 32px;
  height: 32px;
  padding: 0;
  background: #195BBE;
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(25, 91, 190, 0.2);
}

.mf-advisor-default__send:hover:not(:disabled) {
  background: #144a94;
  box-shadow: 0 2px 6px rgba(25, 91, 190, 0.3);
  transform: translateY(-1px);
}

.mf-advisor-default__send:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(25, 91, 190, 0.2);
}

.mf-advisor-default__send:focus,
.mf-advisor-default__send:focus-visible {
  outline: 2px solid rgba(25, 91, 190, 0.5);
  outline-offset: 2px;
  background: #144a94;
}

.mf-advisor-default__send:disabled,
.mf-advisor-default__send.is-loading {
  opacity: 0.6;
  cursor: not-allowed;
  background: rgba(25, 91, 190, 0.6);
}

.mf-advisor-default__send svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  display: block;
}

.mf-advisor-default__prompts {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.mf-advisor-default__prompts-label {
  font-size: 14px;
  color: rgba(17, 24, 39, 0.6);
  margin-bottom: 4px;
  text-align: center;
}

.mf-advisor-default__prompt {
  display: inline-block;
  width: auto;
  padding: 10px 16px;
  background: #fff;
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-radius: 20px;
  font-size: 14px;
  color: rgba(17, 24, 39, 0.75);
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.mf-advisor-default__prompt:hover {
  background: rgba(17, 24, 39, 0.05);
  border-color: rgba(17, 24, 39, 0.2);
}

/* Chat state */
.mf-advisor-chat {
  max-width: 920px;
  margin: 20px auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 200px);
  min-height: 600px;
}

.mf-advisor-chat__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(17, 24, 39, 0.08);
  margin-bottom: 24px;
}

.mf-advisor-chat__title {
  font-size: 24px;
  font-weight: 600;
  color: rgba(17, 24, 39, 0.9);
  margin: 0;
}

.mf-advisor-chat__new-chat {
  padding: 6px 16px;
  background: transparent;
  border: 1px solid rgba(17, 24, 39, 0.14);
  border-radius: 8px;
  font-size: 14px;
  color: rgba(17, 24, 39, 0.7);
  cursor: pointer;
  transition: all 0.2s;
}

.mf-advisor-chat__new-chat:hover {
  background: rgba(17, 24, 39, 0.04);
  border-color: rgba(17, 24, 39, 0.2);
}

.mf-advisor-chat__thread {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px 0;
  margin-bottom: 20px;
}

.mf-advisor-chat__thread::-webkit-scrollbar {
  width: 8px;
}

.mf-advisor-chat__thread::-webkit-scrollbar-thumb {
  background: rgba(17, 24, 39, 0.12);
  border-radius: 4px;
}

.mf-advisor-chat__thread::-webkit-scrollbar-track {
  background: transparent;
}

.mf-advisor-chat__composer {
  padding-top: 16px;
  border-top: 1px solid rgba(17, 24, 39, 0.08);
}

.mf-advisor-chat__input-wrapper {
  position: relative;
  border-radius: 12px;
  padding: 2px;
  background: linear-gradient(135deg, #7c3aed 0%, #ec4899 100%);
  transition: opacity 0.2s;
  overflow: hidden;
  display: block;
  box-sizing: border-box;
}

.mf-advisor-chat__input-wrapper:focus-within {
  opacity: 1;
}

.mf-advisor-chat__textarea {
  width: 100%;
  min-height: 80px;
  max-height: 300px;
  padding: 12px 50px 12px 16px;
  margin: 0;
  border: none;
  border-radius: calc(12px - 2px);
  font-size: 15px;
  font-family: inherit;
  resize: none;
  outline: none;
  background: #fff;
  box-sizing: border-box;
  overflow-y: auto;
  line-height: 1.5;
  display: block;
}

.mf-advisor-chat__textarea::placeholder {
  color: rgba(17, 24, 39, 0.45);
}

.mf-advisor-chat__send {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 32px;
  height: 32px;
  padding: 0;
  background: #195BBE;
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(25, 91, 190, 0.2);
}

.mf-advisor-chat__send:hover:not(:disabled) {
  background: #144a94;
  box-shadow: 0 2px 6px rgba(25, 91, 190, 0.3);
  transform: translateY(-1px);
}

.mf-advisor-chat__send:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(25, 91, 190, 0.2);
}

.mf-advisor-chat__send:focus,
.mf-advisor-chat__send:focus-visible {
  outline: 2px solid rgba(25, 91, 190, 0.5);
  outline-offset: 2px;
  background: #144a94;
}

.mf-advisor-chat__send:disabled,
.mf-advisor-chat__send.is-loading {
  opacity: 0.6;
  cursor: not-allowed;
  background: rgba(25, 91, 190, 0.6);
}

.mf-advisor-chat__send svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  display: block;
}

/* Messages */
.mf-msg {
  display: flex;
  margin-bottom: 20px;
  width: 100%;
}

.mf-msg--user {
  justify-content: flex-end;
}

.mf-msg--advisor {
  justify-content: flex-start;
  position: relative;
  padding-top: 20px;
}

.mf-bubble {
  max-width: 85%;
  padding: 14px 22px;
  border-radius: 8px;
  line-height: 1.6;
  font-size: 15px;
  word-wrap: break-word;
  white-space: pre-wrap;
}

.mf-bubble--user {
  background: #3B82F6;
  color: #FFFFFF;
  border-bottom-right-radius: 4px;
  margin-right: 5px;
}

.mf-bubble--advisor {
  background: #F8F9FA;
  color: #4B5563;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-bottom-left-radius: 4px;
  position: relative;
}

.mf-bubble--loading {
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mf-msg__label {
  position: absolute;
  top: -3px;
  left: 0;
  font-size: 13px;
  font-weight: 700;
  color: #4974F1;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mf-bubble__text {
  margin-bottom: 12px;
  white-space: pre-wrap;
}

.mf-bubble__text:last-child {
  margin-bottom: 0;
}

/* Loading indicator */
.mf-loading {
  display: flex;
  gap: 6px;
  align-items: center;
}

.mf-loading__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(17, 24, 39, 0.4);
  animation: mf-loading-bounce 1.4s infinite ease-in-out;
}

.mf-loading__dot:nth-child(1) {
  animation-delay: -0.32s;
}

.mf-loading__dot:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes mf-loading-bounce {
  0%,
  80%,
  100% {
    transform: scale(0);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Frameworks section */
.mf-bubble__frameworks {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(17, 24, 39, 0.08);
}

.mf-bubble__frameworks-heading {
  font-size: 14px;
  font-weight: 600;
  color: rgba(17, 24, 39, 0.7);
  margin-bottom: 12px;
}

.mf-framework-card {
  display: block;
  padding: 14px;
  margin-bottom: 10px;
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-radius: 10px;
  background: #FFFFFF;
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.mf-framework-card:last-child {
  margin-bottom: 0;
}

.mf-framework-card:hover {
  border-color: rgb(59 130 246 / 0.5);
  background: #FFFFFF;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.mf-framework-card__title {
  font-size: 16px;
  font-weight: 600;
  color: rgba(17, 24, 39, 0.9);
  margin-bottom: 6px;
}

.mf-framework-card__summary {
  font-size: 14px;
  color: rgba(17, 24, 39, 0.7);
  line-height: 1.5;
  margin-bottom: 10px;
}

.mf-framework-card__link {
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  color: #3b82f6;
  text-decoration: none;
  transition: color 0.2s;
  pointer-events: none;
}

.mf-framework-card:hover .mf-framework-card__link {
  color: #2563eb;
}

/* Responsive */
@media (max-width: 768px) {
  .mf-advisor-default {
    margin: 40px auto;
    padding: 0 20px;
  }

  .mf-advisor-default__title {
    font-size: 32px;
  }

  .mf-advisor-default__subtitle {
    font-size: 16px;
  }

  .mf-advisor-default__prompts {
    align-items: stretch;
  }

  .mf-advisor-default__prompt {
    width: 100%;
  }

  .mf-advisor-chat {
    margin: 0 auto;
    padding: 0 20px;
    height: calc(100vh - 160px);
    min-height: 500px;
  }

  .mf-bubble {
    max-width: 85%;
  }

}

