/**
 * Frontend Styles
 */
.websamurai-edit-tab {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(135deg, #f7c938 0%, #ffd966 100%);
  color: #333;
  padding: 15px 12px;
  border-radius: 8px 0 0 8px;
  cursor: pointer;
  z-index: 10000;
  box-shadow: -2px 2px 10px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 1px;
}
.websamurai-edit-tab:hover {
  background: linear-gradient(135deg, #ffd966 0%, #f7c938 100%);
  box-shadow: -3px 3px 15px rgba(0, 0, 0, 0.3);
  padding-left: 15px;
}
.websamurai-edit-tab.open {
  right: 400px;
}
.websamurai-edit-tab .tab-text {
  user-select: none;
}
.websamurai-edit-panel {
  position: fixed;
  top: 32px;
  right: -400px;
  width: 400px;
  height: calc(100vh - 32px);
  background: #fff;
  box-shadow: -2px 0 20px rgba(0, 0, 0, 0.1);
  z-index: 9999;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
}
.websamurai-edit-panel.open {
  right: 0;
}
.websamurai-edit-panel .panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e5e7eb;
  background: linear-gradient(135deg, #f7c938 0%, #ffd966 100%);
  color: #333;
}
.websamurai-edit-panel .panel-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}
.websamurai-edit-panel .panel-header .close-button {
  background: transparent;
  border: none;
  color: #333;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}
.websamurai-edit-panel .panel-header .close-button:hover {
  background-color: rgba(0, 0, 0, 0.1);
}
.websamurai-edit-panel .panel-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.websamurai-edit-panel .panel-content .responses-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 20px 20px 0 20px;
}
.websamurai-edit-panel .panel-content .responses-area .empty-state {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  text-align: center;
  padding: 40px 20px;
}
.websamurai-edit-panel .panel-content .responses-area .empty-state p {
  margin: 0;
  font-size: 14px;
}
.websamurai-edit-panel .panel-content .responses-area .responses-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e5e7eb;
}
.websamurai-edit-panel .panel-content .responses-area .responses-header .responses-count {
  font-size: 12px;
  color: #6b7280;
  font-weight: 600;
}
.websamurai-edit-panel .panel-content .responses-area .responses-header .clear-button {
  background: transparent;
  border: none;
  color: #6b7280;
  font-size: 12px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}
.websamurai-edit-panel .panel-content .responses-area .responses-header .clear-button:hover {
  background-color: #f3f4f6;
}
.websamurai-edit-panel .panel-content .responses-area .responses-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.websamurai-edit-panel .panel-content .responses-area .responses-list .response-message {
  padding: 12px;
  border-radius: 8px;
  animation: slideIn 0.2s ease;
}
.websamurai-edit-panel .panel-content .responses-area .responses-list .response-message.user {
  background-color: #fffbeb;
  border-left: 3px solid #f7c938;
}
.websamurai-edit-panel .panel-content .responses-area .responses-list .response-message.ai {
  background-color: #fef9e7;
  border-left: 3px solid #f7c938;
}
.websamurai-edit-panel .panel-content .responses-area .responses-list .response-message.error {
  background-color: #fef2f2;
  border-left: 3px solid #ef4444;
}
.websamurai-edit-panel .panel-content .responses-area .responses-list .response-message .message-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.websamurai-edit-panel .panel-content .responses-area .responses-list .response-message .message-header .message-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.websamurai-edit-panel .panel-content .responses-area .responses-list .response-message .message-header .message-time {
  font-size: 11px;
  color: #6b7280;
}
.websamurai-edit-panel .panel-content .responses-area .responses-list .response-message .message-text {
  font-size: 13px;
  line-height: 1.5;
  color: #333;
  word-wrap: break-word;
}
.websamurai-edit-panel .panel-content .responses-area .responses-list .response-message.user .message-label {
  color: #d97706;
}
.websamurai-edit-panel .panel-content .responses-area .responses-list .response-message.ai .message-label {
  color: #b45309;
}
.websamurai-edit-panel .panel-content .responses-area .responses-list .response-message.error .message-label {
  color: #ef4444;
}
.websamurai-edit-panel .panel-content .input-area {
  padding: 15px 20px 20px 20px;
  border-top: 1px solid #e5e7eb;
  background-color: #f9fafb;
}
.websamurai-edit-panel .panel-content .input-area .ai-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 13px;
  line-height: 1.4;
  resize: none;
  transition: border-color 0.2s ease;
  margin-bottom: 10px;
  background-color: #fff;
}
.websamurai-edit-panel .panel-content .input-area .ai-textarea:focus {
  outline: none;
  border-color: #f7c938;
  background-color: #fff;
}
.websamurai-edit-panel .panel-content .input-area .ai-textarea:disabled {
  background-color: #f3f4f6;
  cursor: not-allowed;
}
.websamurai-edit-panel .panel-content .input-area .ai-textarea::placeholder {
  color: #9ca3af;
  font-size: 12px;
}
.websamurai-edit-panel .panel-content .input-area .panel-actions {
  display: flex;
  gap: 8px;
}
.websamurai-edit-panel .panel-content .input-area .panel-actions button {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.websamurai-edit-panel .panel-content .input-area .panel-actions button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.websamurai-edit-panel .panel-content .input-area .panel-actions .submit-button {
  flex: 1;
  background: linear-gradient(135deg, #f7c938 0%, #ffd966 100%);
  color: #333;
  font-weight: 700;
}
.websamurai-edit-panel .panel-content .input-area .panel-actions .submit-button:hover:not(:disabled) {
  box-shadow: 0 4px 12px rgba(247, 201, 56, 0.4);
  transform: translateY(-1px);
}
.websamurai-edit-panel .panel-content .input-area .panel-actions .submit-button:active:not(:disabled) {
  transform: translateY(0);
}
.websamurai-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes thinking-bounce {
  0%,
  80%,
  100% {
    transform: scale(0);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}
.thinking-animation {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 8px 0;
}
.thinking-animation .dot {
  width: 8px;
  height: 8px;
  background-color: #f7c938;
  border-radius: 50%;
  animation: thinking-bounce 1.4s infinite ease-in-out both;
}
.thinking-animation .dot:nth-child(1) {
  animation-delay: -0.32s;
}
.thinking-animation .dot:nth-child(2) {
  animation-delay: -0.16s;
}
.thinking-animation .dot:nth-child(3) {
  animation-delay: 0s;
}
@media (max-width: 768px) {
  .websamurai-edit-panel {
    width: 100%;
    right: -100%;
  }
  .websamurai-edit-tab.open {
    right: 100%;
  }
}

