/* Ask Stephanie Widget Styles */

/* Force light mode for form inputs */
.ask-form-group input,
.ask-form-group textarea {
  color-scheme: light !important;
}

/* Modern Form Container */
.ask-form-modal {
  background: linear-gradient(135deg, #ffffff 0%, #fefefe 100%);
  border-radius: 20px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9);
  transition: transform 0.3s ease;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(139, 169, 181, 0.1);
}

/* Question Cards */
.questions-container {
  display: grid;
  gap: 20px;
  margin-top: 30px;
}

.question-card {
  background: white;
  border-radius: 16px;
  padding: 25px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
  animation: fadeInUp 0.5s ease forwards;
  opacity: 0;
  transform: translateY(20px);
}

.question-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.question-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

.question-icon {
  width: 40px;
  height: 40px;
  background: var(--shuptrine-blue-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.question-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--shuptrine-blue);
  fill: none;
  stroke-width: 2;
}

.question-meta {
  flex: 1;
}

.question-date {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.question-content {
  margin-bottom: 15px;
}

.question-text {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-dark);
  font-weight: 400;
}

.answer-content {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--warm-gray);
}

.answer-header {
  margin-bottom: 12px;
}

.answer-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--shuptrine-blue);
  font-weight: 500;
}

.answer-text {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-dark);
  font-style: italic;
  padding-left: 20px;
  border-left: 3px solid var(--shuptrine-blue-light);
}

.no-questions {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-style: italic;
}

/* Search Input */
.ask-search-container {
  margin-bottom: 30px;
}

.ask-search-input {
  width: 100%;
  padding: 15px 20px;
  border: 2px solid var(--warm-gray);
  border-radius: 30px;
  font-size: 15px;
  font-family: 'Lato', sans-serif;
  transition: all 0.3s ease;
  background: white;
}

.ask-search-input:focus {
  outline: none;
  border-color: var(--shuptrine-blue);
  box-shadow: 0 0 0 3px rgba(139, 169, 181, 0.1);
}

/* Question Form Modal */
.ask-form-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  padding: 20px;
}

.ask-form-overlay.active {
  opacity: 1;
  visibility: visible;
}

.ask-form-modal {
  background: white;
  border-radius: 20px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9);
  transition: transform 0.3s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.ask-form-overlay.active .ask-form-modal {
  transform: scale(1);
}

.ask-form-header {
  padding: 35px 45px 30px;
  border-bottom: 1px solid #e8e3dd;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #ffffff 0%, #f8f6f3 100%);
  border-radius: 20px 20px 0 0;
}

.ask-form-header h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 32px;
  font-weight: 400;
  color: #2c2521;
  margin: 0;
  letter-spacing: 0.5px;
}

.ask-form-close {
  background: rgba(139, 169, 181, 0.1);
  border: none;
  cursor: pointer;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.ask-form-close:hover {
  background: rgba(139, 169, 181, 0.2);
  transform: scale(1.05);
}

.ask-form-close:active {
  transform: scale(0.95);
}

.ask-form-close svg {
  width: 18px;
  height: 18px;
  stroke: #7a756e;
  stroke-width: 2.5;
  transition: stroke 0.2s ease;
}

.ask-form-close:hover svg {
  stroke: #2c2521;
}

.ask-form-body {
  padding: 45px;
  background: #ffffff;
}

.ask-form-group {
  margin-bottom: 32px;
  position: relative;
}

.ask-form-group label {
  display: block;
  margin-bottom: 12px;
  font-size: 15px;
  color: #2c2521;
  font-weight: 500;
  letter-spacing: 0.2px;
}

.ask-form-group label span {
  font-weight: 400;
  color: #7a756e;
  font-size: 13px;
}

.ask-form-group input,
.ask-form-group textarea {
  width: 100%;
  padding: 18px 20px;
  border: 2px solid #e8e3dd;
  border-radius: 12px;
  font-size: 16px;
  font-family: 'Lato', sans-serif;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: #ffffff !important;
  background-color: #ffffff !important;
  color: #2c2521 !important;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  line-height: 1.5;
}

.ask-form-group input[type="email"],
.ask-form-group textarea {
  background: #ffffff !important;
  background-color: #ffffff !important;
  color: #2c2521 !important;
}

.ask-form-group input::placeholder,
.ask-form-group textarea::placeholder {
  color: #9b938c !important;
  opacity: 1;
  font-style: italic;
}

.ask-form-group input:focus,
.ask-form-group textarea:focus {
  outline: none;
  border-color: #8ba9b5;
  box-shadow: 0 0 0 4px rgba(139, 169, 181, 0.12), 0 4px 16px rgba(139, 169, 181, 0.08);
  background: #ffffff !important;
  background-color: #ffffff !important;
  color: #2c2521 !important;
  transform: translateY(-1px);
}

.ask-form-group input:-webkit-autofill,
.ask-form-group input:-webkit-autofill:hover,
.ask-form-group input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0px 1000px #ffffff inset !important;
  -webkit-text-fill-color: #2c2521 !important;
  background-color: #ffffff !important;
  border-color: #8ba9b5;
}

.ask-form-group textarea {
  min-height: 140px;
  resize: vertical;
  padding-top: 20px;
  padding-bottom: 20px;
}

.ask-form-group textarea:focus {
  min-height: 160px;
}

/* Add icons to form fields */
.ask-form-group::before {
  content: '';
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  opacity: 0.4;
  pointer-events: none;
}

.ask-form-group:has(input[type="email"])::before {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239b938c' stroke-width='2'%3E%3Cpath d='M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z'/%3E%3Cpolyline points='22,6 12,13 2,6'/%3E%3C/svg%3E") no-repeat center;
  background-size: contain;
}

.ask-form-group:has(textarea)::before {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239b938c' stroke-width='2'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14,2 14,8 20,8'/%3E%3Cline x1='16' y1='13' x2='8' y2='13'/%3E%3Cline x1='16' y1='17' x2='8' y2='17'/%3E%3Cpolyline points='10,9 9,9 8,9'/%3E%3C/svg%3E") no-repeat center;
  background-size: contain;
  top: 24px;
}

.ask-form-actions {
  display: flex;
  gap: 16px;
  justify-content: flex-end;
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid #f0ede9;
}

.ask-form-button {
  padding: 16px 32px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  font-family: 'Lato', sans-serif;
  letter-spacing: 0.3px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ask-form-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.ask-form-button:hover::before {
  left: 100%;
}

.ask-form-button.primary {
  background: linear-gradient(135deg, #8ba9b5 0%, #6b8894 100%);
  color: white;
  border: 2px solid transparent;
  min-width: 140px;
}

.ask-form-button.primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #6b8894 0%, #5a6f79 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 169, 181, 0.3);
}

.ask-form-button.primary:active {
  transform: translateY(0);
}

.ask-form-button.secondary {
  background: #ffffff;
  color: #7a756e;
  border: 2px solid #e8e3dd;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.ask-form-button.secondary:hover {
  border-color: #8ba9b5;
  color: #8ba9b5;
  background: #f8f6f3;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(139, 169, 181, 0.15);
}

.ask-form-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
}

.ask-message {
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 24px;
  display: none;
  font-size: 14px;
  line-height: 1.5;
  border-left: 4px solid;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ask-message.error {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  color: #dc2626;
  border-left-color: #dc2626;
}

.ask-message.success {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  color: #16a34a;
  border-left-color: #16a34a;
}

/* Enhanced Ask Section */
.ask-section .ask-preview {
  position: relative;
}

.ask-input-preview {
  position: relative;
}

.ask-input-preview input {
  cursor: pointer;
}

.ask-input-preview input:not(:disabled) {
  cursor: text;
}

/* Show Questions Button */
.show-questions-btn {
  margin-top: 30px;
  padding: 16px 32px;
  background: linear-gradient(135deg, #8ba9b5 0%, #6b8894 100%);
  border: 2px solid transparent;
  color: white;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: 'Lato', sans-serif;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 16px rgba(139, 169, 181, 0.2);
  position: relative;
  overflow: hidden;
}

.show-questions-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.show-questions-btn:hover {
  background: linear-gradient(135deg, #6b8894 0%, #5a6f79 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(139, 169, 181, 0.3);
}

.show-questions-btn:hover::before {
  left: 100%;
}

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

/* Responsive */
@media (max-width: 768px) {
  .ask-form-modal {
    max-width: 95vw;
    max-height: 95vh;
    margin: 10px;
    border-radius: 16px;
  }

  .ask-form-header {
    padding: 25px 20px 20px;
  }

  .ask-form-header h3 {
    font-size: 28px;
  }

  .ask-form-body {
    padding: 30px 20px;
  }

  .ask-form-group {
    margin-bottom: 28px;
  }

  .ask-form-group input,
  .ask-form-group textarea {
    padding: 16px 18px;
    font-size: 16px; /* Prevents zoom on iOS */
  }

  .ask-form-actions {
    flex-direction: column-reverse;
    gap: 12px;
    margin-top: 35px;
  }

  .ask-form-button {
    width: 100%;
    padding: 18px 24px;
    font-size: 16px;
  }

  .ask-form-close {
    padding: 10px;
  }

  .ask-form-close svg {
    width: 16px;
    height: 16px;
  }

  .question-card {
    padding: 20px;
  }

  .show-questions-btn {
    width: 100%;
    max-width: 300px;
  }
}

@media (max-width: 480px) {
  .ask-form-header {
    padding: 20px 15px 15px;
  }

  .ask-form-header h3 {
    font-size: 24px;
  }

  .ask-form-body {
    padding: 25px 15px;
  }

  .ask-form-group input,
  .ask-form-group textarea {
    padding: 14px 16px;
  }

  .ask-form-button {
    padding: 16px 20px;
  }
}
