/* ================================================
   Support Widget - RELLA 톤앤매너
   보라색 그라데이션, 둥근 모서리, 따뜻한 느낌
   ================================================ */

/* Floating Button */
.support-floating-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #b97ef5 0%, #9b5de5 100%);
  color: white;
  border: none;
  border-radius: 50%;
  box-shadow: 0 4px 20px rgba(185, 126, 245, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.support-floating-btn:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 28px rgba(185, 126, 245, 0.5);
}

.support-floating-btn:active {
  transform: translateY(-2px) scale(1.02);
}

.support-floating-btn svg {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Modal */
.support-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.support-modal.hidden {
  display: none;
}

.support-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(59, 33, 65, 0.6);
  backdrop-filter: blur(8px);
}

.support-modal-panel {
  position: relative;
  background: linear-gradient(145deg, #ffffff 0%, #fffef8 100%);
  border-radius: 24px;
  box-shadow: 0 16px 48px rgba(59, 33, 65, 0.2);
  width: 90%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Header */
.support-modal-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 28px 28px 20px;
  border-bottom: 2px solid #f5f0ff;
}

.header-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #b97ef5 0%, #9b5de5 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.header-text {
  flex: 1;
}

.header-text h2 {
  font-size: 20px;
  font-weight: 700;
  color: #3b2141;
  margin: 0 0 4px 0;
}

.header-subtitle {
  font-size: 14px;
  color: #9f7737;
  margin: 0;
}

.support-modal-close {
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.support-modal-close:hover {
  background: #f5f0ff;
  color: #b97ef5;
}

/* Current Page Info */
.current-page-info {
  margin: 20px 28px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #f5f0ff 0%, #faf8ff 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #ede4ff;
}

.current-page-info svg {
  color: #b97ef5;
  flex-shrink: 0;
}

.page-url {
  font-size: 12px;
  color: #666;
  word-break: break-all;
  line-height: 1.4;
}

/* Form */
.support-form {
  padding: 0 28px 28px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #3b2141;
  margin-bottom: 8px;
}

.required {
  color: #f44336;
  margin-left: 2px;
}

.optional {
  font-size: 13px;
  font-weight: 400;
  color: #999;
  margin-left: 4px;
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e8e0f5;
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  color: #3b2141;
  background: white;
  transition: all 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: #b97ef5;
  box-shadow: 0 0 0 4px rgba(185, 126, 245, 0.1);
}

.form-input.locked {
  background: #f9f6ff;
  cursor: not-allowed;
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

.field-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #9f7737;
  margin-top: 6px;
}

.field-hint svg {
  flex-shrink: 0;
  opacity: 0.8;
}

.char-counter {
  text-align: right;
  font-size: 12px;
  color: #999;
  margin-top: 6px;
}

.error-message {
  color: #f44336;
  font-size: 13px;
  margin-top: 6px;
  min-height: 18px;
  display: block;
}

/* Buttons */
.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  flex: 1;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-secondary {
  background: #f5f5f5;
  color: #666;
}

.btn-secondary:hover {
  background: #e8e8e8;
  color: #3b2141;
}

.btn-primary {
  background: linear-gradient(135deg, #b97ef5 0%, #9b5de5 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(185, 126, 245, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(185, 126, 245, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 4px 12px rgba(185, 126, 245, 0.3);
}

.btn-block {
  width: 100%;
}

/* Success Screen */
.support-success {
  padding: 48px 28px 32px;
  text-align: center;
}

.support-success.hidden {
  display: none;
}

.success-icon {
  margin: 0 auto 24px;
  animation: successPop 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.success-title {
  font-size: 22px;
  font-weight: 700;
  color: #3b2141;
  margin: 0 0 12px 0;
}

.success-message {
  color: #666;
  font-size: 15px;
  line-height: 1.7;
  margin: 0 0 32px 0;
}

/* Spinner */
.spinner-small {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes successPop {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .support-floating-btn {
    width: 56px;
    height: 56px;
    bottom: 20px;
    right: 20px;
  }

  .support-modal-panel {
    width: 95%;
    max-height: 92vh;
    border-radius: 20px;
  }

  .support-modal-header {
    padding: 24px 20px 16px;
  }

  .header-icon {
    width: 44px;
    height: 44px;
  }

  .header-text h2 {
    font-size: 18px;
  }

  .support-form {
    padding: 0 20px 24px;
  }

  .current-page-info {
    margin: 16px 20px;
  }

  .form-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .support-success {
    padding: 40px 20px 24px;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
