/**
 * Contact Form 7 — Custom Styles for AJJY Concept Theme
 * Overrides CF7 defaults to match the Mediterranean Tech design
 */

/* ============================================
   FORM CONTAINER
   ============================================ */
.contact__form--cf7 .wpcf7 {
  width: 100%;
}

.contact__form--cf7 .wpcf7-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ============================================
   FORM ROWS (2 columns)
   ============================================ */
.contact__form--cf7 .contact__form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 640px) {
  .contact__form--cf7 .contact__form-row {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   LABELS
   ============================================ */
.contact__form--cf7 label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary, #1a2b3c);
  margin-bottom: 8px;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

/* ============================================
   INPUT FIELDS
   ============================================ */
.contact__form--cf7 .wpcf7-form-control:not(.wpcf7-submit) {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid rgba(26, 43, 60, 0.12);
  border-radius: 12px;
  font-size: 15px;
  font-family: 'DM Sans', sans-serif;
  color: var(--text-primary, #1a2b3c);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
  outline: none;
  box-sizing: border-box;
}

.contact__form--cf7 .wpcf7-form-control:not(.wpcf7-submit):focus {
  border-color: var(--calanque, #1B6B93);
  box-shadow: 0 0 0 4px rgba(27, 107, 147, 0.1);
}

.contact__form--cf7 .wpcf7-form-control:not(.wpcf7-submit)::placeholder {
  color: rgba(26, 43, 60, 0.35);
}

/* ============================================
   SELECT
   ============================================ */
.contact__form--cf7 .wpcf7-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231a2b3c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
  cursor: pointer;
}

/* ============================================
   TEXTAREA
   ============================================ */
.contact__form--cf7 .wpcf7-textarea {
  resize: vertical;
  min-height: 120px;
}

/* ============================================
   SUBMIT BUTTON
   ============================================ */
.contact__form--cf7 .wpcf7-submit {
  width: 100%;
  padding: 16px 32px;
  background: var(--terracotta, #C45B28);
  color: white;
  border: none;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  font-family: 'Plus Jakarta Sans', sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.contact__form--cf7 .wpcf7-submit:hover {
  background: #A84D22;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(196, 91, 40, 0.35);
}

.contact__form--cf7 .wpcf7-submit:active {
  transform: translateY(0);
}

/* ============================================
   SPINNER (loading)
   ============================================ */
.contact__form--cf7 .wpcf7-spinner {
  display: inline-block;
  margin-left: 12px;
  vertical-align: middle;
}

/* ============================================
   VALIDATION MESSAGES
   ============================================ */
.contact__form--cf7 .wpcf7-not-valid-tip {
  color: #dc3545;
  font-size: 12px;
  margin-top: 6px;
  font-family: 'DM Sans', sans-serif;
}

.contact__form--cf7 .wpcf7-not-valid {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1) !important;
}

/* ============================================
   RESPONSE OUTPUT (success / error)
   ============================================ */
.contact__form--cf7 .wpcf7-response-output {
  margin: 16px 0 0 !important;
  padding: 16px 20px !important;
  border-radius: 12px !important;
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  text-align: center;
}

/* Success */
.contact__form--cf7 .wpcf7-mail-sent-ok,
.contact__form--cf7 .wpcf7 form.sent .wpcf7-response-output {
  border: 2px solid var(--calanque, #1B6B93) !important;
  background: rgba(27, 107, 147, 0.08);
  color: var(--calanque, #1B6B93);
}

/* Error */
.contact__form--cf7 .wpcf7-mail-sent-ng,
.contact__form--cf7 .wpcf7-validation-errors,
.contact__form--cf7 .wpcf7 form.invalid .wpcf7-response-output,
.contact__form--cf7 .wpcf7 form.failed .wpcf7-response-output {
  border: 2px solid #dc3545 !important;
  background: rgba(220, 53, 69, 0.06);
  color: #dc3545;
}

/* ============================================
   ACCEPTANCE / GDPR
   ============================================ */
.contact__form--cf7 .wpcf7-acceptance {
  font-size: 13px;
  color: var(--text-secondary, #4a5568);
}

.contact__form--cf7 .wpcf7-acceptance input[type="checkbox"] {
  margin-right: 8px;
  accent-color: var(--calanque, #1B6B93);
}

/* ============================================
   FIELD WRAPPER SPACING
   ============================================ */
.contact__form--cf7 .contact__field {
  display: flex;
  flex-direction: column;
}

.contact__form--cf7 .contact__field .wpcf7-form-control-wrap {
  width: 100%;
}
