/*
Theme Name: RD Feedback
Author: RD Feedback
Description: Your description goes here
Version: 1.0
Template: hello-elementor
Description: Child theme for RDfeedback.com
*/

@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap");

/* Global Reset and Box-Sizing */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Body Styles */
body {
  font-family: "Poppins", "Inter", sans-serif;
  background: linear-gradient(135deg, #f7f7f7 60%, #e3eaff 100%);
  color: #1f2937;
  min-height: 100vh;
  font-size: 16px;
}

/* Prevent horizontal scroll globally */
html,
body {
  overflow-x: hidden;
}

/* --- Main Form Container --- */

.rd-dashboard-btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: #0126b5;
  color: #ffffff;
  font-weight: 600;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.rd-dashboard-btn:hover {
  background-color: #0126b5;
  color: #ffffff;
  transform: translateY(-1px);
}

.wpcf7 {
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 25px 50px -12px rgba(1, 38, 181, 0.1);
  padding: 2rem 1.5rem;
  max-width: 41rem;
  width: 100%;
  margin: 2.5em auto;
  border: 1.5px solid #e3eaff;
  font-family: "Poppins", "Inter", sans-serif;
  font-size: 16px;
}

/* --- Feedback Header --- */
.feedback-header {
  text-align: center;
  margin-bottom: 2em;
  padding-top: 1em;
}

.rd-logo {
  display: block;
  margin: 0 auto 1em auto;
  max-width: 30% !important;
  height: auto;
  filter: drop-shadow(0 2px 8px rgba(1, 38, 181, 0.08));
}

.form-title {
  font-size: 2rem;
  font-weight: 700;
  color: #0126b5;
  margin: 0.5em 0 0.2em 0;
  letter-spacing: 1px;
  text-align: center;
}

.form-subtitle {
  font-size: 1.1rem;
  font-weight: 400;
  color: #0126b5;
  margin-bottom: 1.5em;
  margin-left: 1.5em;
  text-align: center;
  margin-right: 1.5em;
}

/* --- Step 1 Styles --- */
.feedback-step-1 label {
  font-size: 16px;
  color: #0126b5;
  font-weight: 600;
  margin-bottom: 0.05em;
  display: block;
  letter-spacing: 0.5px;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  font-size: 16px;
  color: #0126b5;
  font-weight: 600;
  margin-bottom: 0.05em;
  display: block;
  letter-spacing: 0.5px;
}

.rd-field {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid #b3c6ff;
  border-radius: 0.5rem;
  font-size: 16px;
  background: #f9faff;
  font-family: inherit;
  transition: border 0.2s, box-shadow 0.2s;
  margin-top: 0;
  margin-bottom: 0;
}

.rd-field:focus {
  border-color: #0126b5;
  box-shadow: 0 0 0 3px #e3eaff;
  outline: none;
}

/* --- Divider --- */
.or-divider {
  text-align: center;
  color: #0126b5;
  margin: 1.5em 0;
  font-weight: 600;
  position: relative;
  letter-spacing: 0.5px;
}

.or-divider::before,
.or-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: #e3eaff;
}

.or-divider::before {
  left: 0;
}

.or-divider::after {
  right: 0;
}

/* --- Receipt Section Container --- */
.receipt-container {
  background: #f8fafc;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(1, 38, 181, 0.06);
  padding: 1.5em 1em;
  margin: 2em 0;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Receipt Instructions Title --- */
.receipt-instructions {
  font-size: 1.1rem;
  color: #1f2937;
  font-weight: 700;
  margin-bottom: 1em;
  letter-spacing: 0.5px;
  text-align: left;
  background: none;
  border: none;
  display: block;
}

/* --- Receipt Sample Area --- */
.receipt-sample {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 90px;
  max-width: 50% !important;
  max-height: 180px; /* Set a max height similar to a card */
  border: 2px dashed #d1d5db; /* Tailwind's border-gray-300 */
  border-radius: 8px; /* rounded-lg */
  background: #fff; /* bg-white */
  color: #6b7280;
  font-size: 0.95rem; /* Decreased font size for desktop */
  font-weight: 500;
  text-align: center;
  margin: 0 auto 0.5em auto;
  padding: 1rem; /* p-4 */
  box-shadow: none;
  transition: border-color 0.2s;
  overflow: hidden; /* Ensures image doesn't overflow the box */
}

.receipt-sample img {
  width: 50% !important;
  height: 100%;
  object-fit: contain; /* Keeps aspect ratio, fits image inside box */
  display: block;
  max-width: 50% !important;
  max-height: 100%;
  border-radius: 4px; /* Optional: slightly round image corners */
}

@media (min-width: 768px) {
  .receipt-sample {
    font-size: 0.9rem; /* Even smaller on larger screens */
  }
}

/* --- Receipt Note --- */
.receipt-note {
  display: block;
  color: #6b7280;
  font-size: 0.95em;
  margin-top: 0.5em;
  text-align: center;
  font-style: normal;
  background: none;
  border: none;
}

/* --- Submit Button --- */
.rd-submit {
  width: 100% !important;
  background: #0126b5 !important;
  color: #ffffff !important;
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 1em !important;
  cursor: pointer !important;
  margin-top: 1em !important;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s !important;
  box-shadow: 0 2px 8px rgba(1, 38, 181, 0.08) !important;
  font-family: inherit !important;
}

.rd-submit:hover,
.rd-submit:focus {
  background: #fffa04 !important;
  color: #0126b5 !important;
  box-shadow: 0 4px 16px rgba(1, 38, 181, 0.12) !important;
  outline: none !important;
}

/* --- Step 2 Styles --- */
.feedback-step-2 {
  font-size: 16px;
  font-family: "Poppins", "Inter", sans-serif;
}

/* Section titles */
.feedback-step-2 .section-title {
  font-size: 1.1rem;
  color: #0126b5;
  font-weight: 700;
  margin: 1.5em 0 1em 0;
  display: flex;
  align-items: center;
  gap: 0.5em;
}

/* Headings */
.form-title,
.feedback-step-2 h2,
.feedback-step-2 h3 {
  font-size: 1.1rem; /* Was 2rem/1.25rem, now smaller */
}

.form-subtitle,
.feedback-step-2 .section-title {
  font-size: 1rem; /* Was 1.1rem */
}

/* Paragraphs and small text */
.feedback-step-2 p,
.feedback-step-2 small,
.receipt-note {
  font-size: 0.95rem; /* Was 16px/0.95em */
}

/* Labels */
.feedback-step-1 label,
.form-group label,
.feedback-step-2 label {
  font-size: 0.95rem; /* Was 16px */
}

/* Form row - Side by side on desktop, stacked on mobile */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.2em;
}

/* Select fields */
.feedback-step-2 select,
.feedback-step-2 .wpcf7-form-control.wpcf7-select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid #b3c6ff;
  border-radius: 0.5rem;
  font-size: 16px;
  background: #f9faff;
  margin-bottom: 0.7em;
  font-family: inherit;
  transition: border 0.2s, box-shadow 0.2s;
}

.feedback-step-2 select:focus,
.feedback-step-2 .wpcf7-form-control.wpcf7-select:focus {
  border-color: #0126b5;
  box-shadow: 0 0 0 3px #e3eaff;
  outline: none;
}

/* Radio groups - Simple flex layout */
.feedback-step-2 .wpcf7-form-control.wpcf7-radio {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem; /* Increased to 1rem for decent spacing */
  margin-bottom: 0.7em;
}

.feedback-step-2 .wpcf7-list-item {
  margin: 0;
  font-size: 16px;
  color: #0126b5;
  font-family: inherit;
  min-width: 80px; /* Ensure minimum width for radio buttons */
}

.feedback-step-2 .wpcf7-list-item label {
  font-weight: 400;
  color: #0126b5;
  margin-bottom: 0;
  display: inline;
}

/* Rating groups - Column layout for star ratings */
.feedback-step-2 .rating-group .wpcf7-form-control.wpcf7-radio {
  display: flex;
  flex-direction: column;
  gap: 0.5rem; /* Decent gap for vertical layout */
}

/* Textareas */
.feedback-step-2 textarea,
.feedback-step-2 .wpcf7-form-control.wpcf7-textarea {
  width: 100%;
  min-height: 80px;
  padding: 0.75rem 1rem;
  border: 1.5px solid #b3c6ff;
  border-radius: 0.5rem;
  font-size: 16px;
  background: #f9faff;
  margin-bottom: 0.7em;
  font-family: inherit;
  transition: border 0.2s, box-shadow 0.2s;
  resize: vertical;
}

.feedback-step-2 textarea:focus,
.feedback-step-2 .wpcf7-form-control.wpcf7-textarea:focus {
  border-color: #0126b5;
  box-shadow: 0 0 0 3px #e3eaff;
  outline: none;
}

/* Text fields */
.feedback-step-2 input[type="text"],
.feedback-step-2 input[type="email"] {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid #b3c6ff;
  border-radius: 0.5rem;
  font-size: 16px;
  background: #f9faff;
  margin-bottom: 0.7em;
  font-family: inherit;
  transition: border 0.2s, box-shadow 0.2s;
}

.feedback-step-2 input[type="text"]:focus,
.feedback-step-2 input[type="email"]:focus {
  border-color: #0126b5;
  box-shadow: 0 0 0 3px #e3eaff;
  outline: none;
}

/* Inputs, selects, textareas, radio items */
.rd-field,
.feedback-step-2 input[type="text"],
.feedback-step-2 input[type="email"],
.feedback-step-2 select,
.feedback-step-2 textarea,
.feedback-step-2 .wpcf7-list-item {
  font-size: 0.95rem; /* Was 16px */
}

/* Submit button */
.feedback-step-2 input[type="submit"],
.feedback-step-2 .wpcf7-submit {
  width: 100% !important;
  background: #0126b5 !important;
  color: #ffffff !important;
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 1em !important;
  cursor: pointer !important;
  margin-top: 1em !important;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s !important;
  box-shadow: 0 2px 8px rgba(1, 38, 181, 0.08) !important;
  font-family: inherit !important;
}

.feedback-step-2 input[type="submit"]:hover,
.feedback-step-2 .wpcf7-submit:hover,
.feedback-step-2 input[type="submit"]:focus,
.feedback-step-2 .wpcf7-submit:focus {
  background: #fffa04 !important;
  color: #0126b5 !important;
  box-shadow: 0 4px 16px rgba(1, 38, 181, 0.12) !important;
  outline: none !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .wpcf7 {
    padding: 1.5rem;
    max-width: 100%; /* Was 100vw */
  }

  .form-title {
    font-size: 1.4rem;
  }

  .form-subtitle {
    font-size: 1rem;
  }

  /* Set font-size to 14px for mobile */
  body,
  .wpcf7,
  .feedback-step-2,
  .form-group label,
  .rd-field,
  .feedback-step-2 label,
  .feedback-step-2 p,
  .feedback-step-2 small,
  .feedback-step-2 input[type="text"],
  .feedback-step-2 input[type="email"],
  .feedback-step-2 select,
  .feedback-step-2 textarea,
  .feedback-step-2 .wpcf7-list-item {
    font-size: 14px !important;
  }

  /* Stack form rows on mobile */
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  /* Single column radio buttons on mobile */
  .feedback-step-2 .wpcf7-form-control.wpcf7-radio {
    grid-template-columns: 1fr;
  }

  /* Rating groups stay column on mobile */
  .feedback-step-2 .rating-group .wpcf7-form-control.wpcf7-radio {
    flex-direction: column;
  }

  .feedback-step-2 h2,
  .feedback-step-2 h3 {
    font-size: 1.1rem;
  }

  .form-group {
    margin-bottom: 1rem;
  }
}

/* Desktop improvements for larger screens */
@media (min-width: 768px) {
  .feedback-step-2 .rating-group .wpcf7-form-control.wpcf7-radio {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* Very small screens */
@media (max-width: 480px) {
  .wpcf7 {
    padding: 1rem 0.5rem;
    max-width: 100%;
  }

  .form-group {
    margin-bottom: 0.8em;
  }
}

/* Button hover color */
.feedback-step-2 input[type="submit"]:hover,
.feedback-step-2 .wpcf7-submit:hover,
.feedback-step-2 input[type="submit"]:focus,
.feedback-step-2 .wpcf7-submit:focus,
.rd-submit:hover,
.rd-submit:focus {
  background: #2340c3 !important; /* Or #001a8c for darker */
  color: #fff !important;
  box-shadow: 0 6px 20px rgba(1, 38, 181, 0.18) !important;
  outline: none !important;
  transform: translateY(-2px) scale(1.03);
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}