/* Contact Form 7 Universal Styles */

/* Base Form Styles */
.wpcf7 {
  margin: 0;
}

.wpcf7-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Form Control Wrapper */
.wpcf7-form-control-wrap {
  position: relative;
  /* width: 100%; */
}

/* Input Field Styles */
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form input[type="url"],
.wpcf7-form input[type="password"],
.wpcf7-form input[type="date"],
.wpcf7-form input[type="number"],
.wpcf7-form textarea,
.wpcf7-form select {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid rgba(26, 26, 26, 0.1);
  border-radius: 10px;
  background: var(--berloga-white);
  color: var(--berloga-text);
  font-family: var(--regular-text-font-family);
  font-size: 16px;
  line-height: 1.5;
  transition: all 0.3s ease;
  box-sizing: border-box;
  outline: none;
}

/* Placeholder Styles */
.wpcf7-form input::placeholder,
.wpcf7-form textarea::placeholder {
  color: rgba(26, 26, 26, 0.5);
  font-weight: 400;
}

/* Focus States */
.wpcf7-form input:focus,
.wpcf7-form textarea:focus,
.wpcf7-form select:focus {
  border-color: var(--berloga-blue);
  background: var(--berloga-white);
  box-shadow: 0 0 0 3px rgba(78, 179, 202, 0.1);
}

/* Textarea Specific */
.wpcf7-form textarea {
  min-height: 120px;
  resize: vertical;
  font-family: var(--regular-text-font-family);
}

/* Select Dropdown */
.wpcf7-form select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 20px;
  padding-right: 50px;
}

/* Submit Button */
.wpcf7-form .wpcf7-submit {
  padding: 16px 32px;
  background: var(--berloga-magenta);
  color: var(--berloga-white);
  border: none;
  border-radius: 10px;
  font-family: var(--regular-text-font-family);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  align-self: flex-start;
  min-width: 200px;
  outline: none;
}

.wpcf7-form .wpcf7-submit:hover {
  background: var(--berloga-magenta-dark, #a0073f);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(181, 8, 71, 0.3);
}

.wpcf7-form .wpcf7-submit:active {
  transform: translateY(0);
}

.wpcf7-form .wpcf7-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Checkbox and Radio */
.wpcf7-form input[type="checkbox"],
.wpcf7-form input[type="radio"] {
  width: auto;
  margin-right: 10px;
  accent-color: var(--berloga-blue);
}

.wpcf7-form .wpcf7-list-item {
  margin: 0 0 10px 0;
  display: flex;
  align-items: center;
}

.wpcf7-form .wpcf7-list-item-label {
  margin: 0;
  font-family: var(--regular-text-font-family);
  font-size: 16px;
  color: var(--berloga-text);
  cursor: pointer;
}

/* File Upload */
.wpcf7-form input[type="file"] {
  padding: 10px;
  border: 2px dashed rgba(26, 26, 26, 0.2);
  background: rgba(26, 26, 26, 0.02);
  cursor: pointer;
}

.wpcf7-form input[type="file"]:hover {
  border-color: var(--berloga-blue);
  background: rgba(78, 179, 202, 0.05);
}

/* Validation States */
.wpcf7-form .wpcf7-not-valid {
  border-color: #e74c3c !important;
  background: rgba(231, 76, 60, 0.05) !important;
}

.wpcf7-form .wpcf7-not-valid:focus {
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1) !important;
}

/* Validation Messages */
.wpcf7-form .wpcf7-not-valid-tip {
  color: #e74c3c;
  font-size: 14px;
  margin-top: 5px;
  display: block;
}

/* Response Messages */
.wpcf7-response-output {
  border-radius: 8px;
  padding: 15px 20px;
  margin: 20px 0 0 0;
  font-family: var(--regular-text-font-family);
  font-size: 14px;
  line-height: 1.5;
}

.wpcf7-mail-sent-ok {
  background: rgba(46, 204, 113, 0.1);
  border: 1px solid #2ecc71;
  color: #27ae60;
}

.wpcf7-validation-errors,
.wpcf7-mail-sent-ng,
.wpcf7-aborted,
.wpcf7-spam-blocked {
  background: rgba(231, 76, 60, 0.1);
  border: 1px solid #e74c3c;
  color: #c0392b;
}

.wpcf7-acceptance-missing {
  background: rgba(230, 126, 34, 0.1);
  border: 1px solid #e67e22;
  color: #d35400;
}

/* Spinner/Loading State */
.wpcf7-form .ajax-loader {
  display: none;
  /* Hide default spinner */
}

.wpcf7-form.submitting .wpcf7-submit::after {
  content: '';
  width: 16px;
  height: 16px;
  margin-left: 10px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  display: inline-block;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Form Layout Helpers */
.wpcf7-form .form-group {
  margin-bottom: 20px;
}

.wpcf7-form .form-group:last-child {
  margin-bottom: 0;
}

.wpcf7-form .form-row {
  display: flex;
  gap: 20px;
}

.wpcf7-form .form-row .form-group {
  flex: 1;
  margin-bottom: 0;
}

/* Label Styles */
.wpcf7-form label {
  display: block;
  margin-bottom: 8px;
  font-family: var(--regular-text-font-family);
  font-size: 14px;
  font-weight: 600;
  color: var(--berloga-text);
}

.wpcf7-form .required::after {
  content: '*';
  color: #e74c3c;
  margin-left: 3px;
}

/* Quiz and Captcha */
.wpcf7-form .wpcf7-quiz-label,
.wpcf7-form .wpcf7-captcha-label {
  font-weight: 600;
}

.wpcf7-form .wpcf7-quiz,
.wpcf7-form .wpcf7-captcha {
  margin-top: 10px;
}

/* Dark Theme Support */
.form-theme-dark .wpcf7-form input[type="text"],
.form-theme-dark .wpcf7-form input[type="email"],
.form-theme-dark .wpcf7-form input[type="tel"],
.form-theme-dark .wpcf7-form textarea,
.form-theme-dark .wpcf7-form select {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: white;
}

.form-theme-dark .wpcf7-form input::placeholder,
.form-theme-dark .wpcf7-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.form-theme-dark .wpcf7-form input:focus,
.form-theme-dark .wpcf7-form textarea:focus,
.form-theme-dark .wpcf7-form select:focus {
  border-color: var(--berloga-blue);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 3px rgba(78, 179, 202, 0.2);
}

.form-theme-dark .wpcf7-form label {
  color: white;
}

.form-theme-dark .wpcf7-form .wpcf7-list-item-label {
  color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
  .wpcf7-form .form-row {
    flex-direction: column;
    gap: 20px;
  }

  .wpcf7-form input[type="text"],
  .wpcf7-form input[type="email"],
  .wpcf7-form input[type="tel"],
  .wpcf7-form textarea,
  .wpcf7-form select {
    font-size: 16px;
    /* Prevent zoom on iOS */
  }

  .wpcf7-form .wpcf7-submit {
    width: 100%;
    min-width: auto;
  }
}

@media (max-width: 480px) {
  .wpcf7-form {
    gap: 15px;
  }

  .wpcf7-form input[type="text"],
  .wpcf7-form input[type="email"],
  .wpcf7-form input[type="tel"],
  .wpcf7-form textarea,
  .wpcf7-form select {
    padding: 12px 16px;
  }

  .wpcf7-response-output {
    padding: 12px 16px;
    font-size: 13px;
  }
}