/* Shiva Tattva Contact Form Styles */
.stcf-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.stcf-form-wrapper {
  background-color: #f5f3f0;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.stcf-title {
  color: #8b7355;
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 30px 0;
  text-align: left;
  letter-spacing: 1px;
}

.stcf-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.stcf-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.stcf-field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stcf-field-group label {
  color: #2c3e50;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 5px;
}

.stcf-field-group input,
.stcf-field-group textarea,
.stcf-country-select,
.stcf-select {
  padding: 12px 16px;
  border: 1px solid #e0ddd8;
  border-radius: 8px;
  background-color: #ffffff;
  font-size: 14px;
  color: #2c3e50;
  transition: all 0.3s ease;
  outline: none;
}

.stcf-field-group input:focus,
.stcf-field-group textarea:focus,
.stcf-country-select:focus,
.stcf-select:focus {
  border-color: #8b7355;
  box-shadow: 0 0 0 3px rgba(139, 115, 85, 0.1);
}

.stcf-phone-wrapper {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.stcf-country-select {
  /* Fixed width and flex properties to prevent overlap */
  width: 140px;
  flex-shrink: 0;
  flex-grow: 0;
}

.stcf-phone-wrapper input {
  /* Ensured phone input takes remaining space properly */
  flex: 1;
  min-width: 0; /* Prevents flex item from overflowing */
}

.stcf-textarea-wrapper {
  position: relative;
}

.stcf-textarea-wrapper textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  padding-bottom: 30px;
}

.stcf-textarea-wrapper textarea::placeholder {
  color: #7f8c8d;
  font-style: italic;
}

.stcf-char-count {
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-size: 12px;
  color: #7f8c8d;
  background-color: rgba(255, 255, 255, 0.9);
  padding: 2px 6px;
  border-radius: 4px;
}

.stcf-submit-btn {
  background-color: #8b7355;
  color: white;
  padding: 14px 28px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  align-self: flex-start;
  position: relative;
  overflow: hidden;
}

.stcf-submit-btn:hover {
  background-color: #75634a;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(139, 115, 85, 0.3);
}

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

.stcf-submit-btn:disabled {
  background-color: #bdb3a3;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.stcf-spinner {
  display: inline-block;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.stcf-message {
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  margin-top: 15px;
}

.stcf-message.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.stcf-message.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.stcf-honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.stcf-recaptcha {
  margin: 15px 0;
}

/* File upload styling */
.stcf-file-input {
  padding: 12px 16px;
  border: 2px dashed #e0ddd8;
  border-radius: 8px;
  background-color: #fafafa;
  font-size: 14px;
  color: #2c3e50;
  transition: all 0.3s ease;
  cursor: pointer;
}

.stcf-file-input:hover {
  border-color: #8b7355;
  background-color: #f5f3f0;
}

.stcf-file-input:focus {
  border-color: #8b7355;
  box-shadow: 0 0 0 3px rgba(139, 115, 85, 0.1);
  outline: none;
}

.stcf-file-info {
  margin-top: 5px;
}

.stcf-file-info small {
  color: #7f8c8d;
  font-size: 12px;
}

/* File upload validation */
.stcf-file-input.error {
  border-color: #e74c3c;
  background-color: #fdf2f2;
}

.stcf-file-error {
  color: #e74c3c;
  font-size: 12px;
  margin-top: 4px;
}

/* File upload success state */
.stcf-file-input.success {
  border-color: #27ae60;
  background-color: #f0f9f4;
}

.stcf-file-success {
  color: #27ae60;
  font-size: 12px;
  margin-top: 4px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .stcf-container {
    padding: 15px;
  }

  .stcf-form-wrapper {
    padding: 25px 20px;
  }

  .stcf-row {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .stcf-title {
    font-size: 20px;
    text-align: center;
  }

  .stcf-phone-wrapper {
    /* Keep flex layout on mobile but increase gap */
    flex-direction: row;
    gap: 10px;
  }

  .stcf-country-select {
    /* Smaller width on mobile to give more space to phone input */
    width: 120px;
    min-width: 120px;
  }
}

/* Loading state */
.stcf-form.loading .stcf-submit-btn {
  pointer-events: none;
}

.stcf-form.loading .stcf-btn-text {
  opacity: 0;
}

.stcf-form.loading .stcf-spinner {
  display: inline-block;
}

/* Validation styles */
.stcf-field-group input.error,
.stcf-field-group textarea.error,
.stcf-file-input.error {
  border-color: #e74c3c;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.stcf-field-group .error-message,
.stcf-file-error {
  color: #e74c3c;
  font-size: 12px;
  margin-top: 4px;
}

/* Accessibility improvements */
.stcf-field-group input:focus-visible,
.stcf-field-group textarea:focus-visible,
.stcf-country-select:focus-visible,
.stcf-select:focus-visible {
  outline: 2px solid #8b7355;
  outline-offset: 2px;
}

.stcf-submit-btn:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

/* Animation for form submission */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stcf-message {
  animation: fadeIn 0.3s ease-out;
}
