.min-eb-widget {
  max-width: 520px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 24px;
  padding: 18px 18px 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  font-family: 'Helvetica Neue', Arial, sans-serif;
}

.min-eb-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "logo logo"
    "start upload";
  align-items: start;
  gap: 12px;
  margin-bottom: 14px;
}
.min-eb-hero #min-eb-start { grid-area: start; }
.min-eb-hero #min-eb-upload-trigger { grid-area: upload; }
.min-eb-hero .min-eb-logo-wrap { grid-area: logo; }

.min-eb-logo-wrap {
  width: 80px;
  height: 80px;
  background: radial-gradient(circle at 30% 30%, rgba(23, 201, 100, 0.18), rgba(23, 201, 100, 0.05));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 0, 0, 0.05);
  justify-self: center;
}

.min-eb-logo {
  width: 70px;
  height: 70px;
  object-fit: contain;
}

.min-eb-btn {
  width: 100%;
  padding: 14px 18px;
  border-radius: 20px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.05);
}

.min-eb-btn.primary {
  background: linear-gradient(135deg, #17c964, #12a953);
  color: #ffffff;
  border: none;
}

.min-eb-btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(23, 201, 100, 0.28);
}

.min-eb-btn.ghost {
  background: #ffffff;
  color: #111111;
}

.min-eb-btn.ghost:hover {
  background: #f8fef9;
  border-color: #cdebd9;
}

.min-eb-mode-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f7fbf8;
  border: 1px solid #e2f2e8;
  border-radius: 14px;
  padding: 8px 12px;
  margin-bottom: 10px;
}

.min-eb-mode-toggle label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #0d1b12;
}

.min-eb-hint {
  color: #4f6657;
}

.min-eb-chat-window {
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 18px;
  padding: 12px;
  height: 360px;
  overflow-y: auto;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  position: relative;
}

.min-eb-bubble {
  padding: 12px 14px;
  border-radius: 16px;
  max-width: 90%;
  margin-bottom: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
  font-size: 15px;
  line-height: 1.4;
  position: relative;
}

.min-eb-bubble.assistant {
  background: #f0fbf4;
  border: 1px solid #d4f0de;
  color: #0c401f;
  border-top-left-radius: 4px;
  padding-left: 58px;
  margin-left: 32px;
}

.min-eb-bubble.user {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  margin-left: auto;
  border-top-right-radius: 4px;
}

.min-eb-bubble.assistant::before {
  content: '';
  position: absolute;
  left: -34px;
  top: 6px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff center center / cover no-repeat;
  background-image: var(--min-eb-avatar, none);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06);
}

.min-eb-bubble.assistant::after {
  content: '';
  position: absolute;
  left: -4px;
  top: 18px;
  width: 10px;
  height: 10px;
  background: #f0fbf4;
  border-left: 1px solid #d4f0de;
  border-bottom: 1px solid #d4f0de;
  transform: rotate(45deg);
  border-radius: 2px;
}

.min-eb-typing {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 6px 10px;
  background: #f0fbf4;
  border-radius: 12px;
  width: fit-content;
}

.min-eb-typing .dot {
  width: 8px;
  height: 8px;
  background: #17c964;
  border-radius: 50%;
  animation: min-eb-bounce 1s infinite;
}

.min-eb-typing .dot:nth-child(2) { animation-delay: 0.15s; }
.min-eb-typing .dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes min-eb-bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.6; }
  40% { transform: scale(1); opacity: 1; }
}

.min-eb-input-bar {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr 110px;
  gap: 8px;
}

#min-eb-input {
  width: 100%;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  padding: 12px;
  font-size: 15px;
  outline: none;
}

#min-eb-input:focus {
  border-color: #17c964;
  box-shadow: 0 0 0 3px rgba(23, 201, 100, 0.12);
}

.min-eb-send {
  background: linear-gradient(135deg, #17c964, #12a953);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 14px rgba(23, 201, 100, 0.18);
  transition: all 0.2s ease;
}

.min-eb-send:hover { transform: translateY(-1px); }

.min-eb-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.min-eb-modal {
  background: #fff;
  border-radius: 16px;
  max-width: 520px;
  width: 92%;
  box-shadow: 0 18px 40px rgba(0,0,0,0.18);
  overflow: hidden;
  position: relative;
}

.min-eb-modal header {
  padding: 14px 16px;
  border-bottom: 1px solid #eef0f2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
}

.min-eb-modal header button {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
}

.min-eb-modal .body {
  padding: 16px;
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 14px;
}

.min-eb-modal .body img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid #eee;
}

.min-eb-modal .body .desc {
  color: #333;
  font-size: 14px;
  line-height: 1.4;
}

.min-eb-modal footer {
  padding: 14px 16px 16px;
  border-top: 1px solid #eef0f2;
  display: flex;
  justify-content: flex-end;
}

.min-eb-modal .add-btn {
  background: linear-gradient(135deg, #17c964, #12a953);
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 14px rgba(23, 201, 100, 0.18);
}

@media (max-width: 600px) {
  .min-eb-widget { padding: 14px 12px; }
  .min-eb-btn { padding: 12px; }
  .min-eb-input-bar { grid-template-columns: 1fr 90px; }
}
