/* Message Widget Styles - 留言插件样式 */

.message-widget {
  position: fixed;
  right: 20px;
  top: 60%;
  transform: translateY(-50%);
  z-index: 9998;
  transition: all 0.3s ease;
}

.message-toggle {
  position: absolute;
  right: 0;
  top: 0%;
  transform: translateY(-50%);
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #1e73be 0%, #0d5aa7 100%);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(30, 115, 190, 0.4);
  transition: all 0.3s ease;
  border: 3px solid #fff;
}

.message-toggle:hover {
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 25px rgba(30, 115, 190, 0.5);
}

.message-toggle svg {
  width: 32px;
  height: 32px;
  fill: #fff;
}

.message-toggle.active svg {
  transform: rotate(180deg);
}

.message-panel {
  position: absolute;
  right: 80px;
  top: 50%;
  transform: translateY(-50%) translateX(100%);
  width: 420px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  overflow: hidden;
}

.message-panel.active {
  transform: translateY(-50%) translateX(0);
  opacity: 1;
  visibility: visible;
}

.message-header {
  background: linear-gradient(135deg, #1e73be 0%, #0d5aa7 100%);
  color: #fff;
  padding: 20px 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.message-header h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
}

.message-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  line-height: 1;
  padding: 0;
}

.message-close:hover {
  transform: rotate(90deg);
  opacity: 0.8;
}

.message-body {
  padding: 30px 25px;
  max-height: none;
  overflow-y: visible;
}

.message-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 14px;
  color: #333;
  margin-bottom: 8px;
  font-weight: 500;
}

.form-group label .required {
  color: #e74c3c;
  margin-left: 3px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.3s ease;
  font-family: inherit;
  background: #f8f9fa;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #1e73be;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(30, 115, 190, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #999;
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.code-wrapper {
  display: flex;
  gap: 10px;
  align-items: center;
}

.code-wrapper input {
  flex: 1;
}

.code-img {
  height: 44px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid #ddd;
  transition: all 0.3s ease;
}

.code-img:hover {
  border-color: #1e73be;
  transform: scale(1.05);
}

.form-submit {
  background: linear-gradient(135deg, #1e73be 0%, #0d5aa7 100%);
  color: #fff;
  border: none;
  padding: 14px 30px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.form-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(30, 115, 190, 0.3);
}

.form-submit:active {
  transform: translateY(0);
}

.form-submit svg {
  width: 18px;
  height: 18px;
  fill: #fff;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .message-widget {
    right: 15px;
  }

  .message-toggle {
    width: 55px;
    height: 55px;
  }

  .message-toggle svg {
    width: 28px;
    height: 28px;
  }

  .message-panel {
    right: 75px;
    width: calc(100vw - 110px);
    max-width: 380px;
  }

  .message-header {
    padding: 18px 20px;
  }

  .message-header h3 {
    font-size: 20px;
  }

  .message-body {
    padding: 25px 20px;
    max-height: none;
  }

  .form-group input,
  .form-group textarea {
    padding: 10px 12px;
  }

  .form-group textarea {
    min-height: 100px;
  }
}

@media (max-width: 480px) {
  .message-widget {
    right: 10px;
  }

  .message-toggle {
    width: 50px;
    height: 50px;
  }

  .message-toggle svg {
    width: 24px;
    height: 24px;
  }

  .message-panel {
    right: 65px;
    width: calc(100vw - 90px);
  }

  .message-header h3 {
    font-size: 18px;
  }

  .message-body {
    padding: 20px 15px;
  }

  .form-submit {
    padding: 12px 25px;
    font-size: 15px;
  }
}

/* 滚动条样式 */
.message-body::-webkit-scrollbar {
  width: 6px;
}

.message-body::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.message-body::-webkit-scrollbar-thumb {
  background: #1e73be;
  border-radius: 10px;
}

.message-body::-webkit-scrollbar-thumb:hover {
  background: #0d5aa7;
}
