/* File: assets/css/multistep-form.css */

/* --- Base Form and Step Styling --- */

/* ── Recommendation Step ── */
.wpmf-recommendation-card {
  width: 100%;
  box-sizing: border-box;
}

.wpmf-bundle-container {
  width: 100%;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
}

.wpmf-bundle-item {
  border-bottom: 1px solid #eee;
  cursor: pointer;
  transition: background 0.15s;
}

.wpmf-bundle-item:last-child {
  border-bottom: none;
}

.wpmf-bundle-item:hover,
.wpmf-bundle-item.wpmf-item-selected {
  background: #f0fff4;
}

.wpmf-bundle-item.wpmf-item-selected {
  border-left: 3px solid #28a745;
}

/* THE KEY: same grid for every row */
.wpmf-bundle-row {
  display: grid;
  grid-template-columns: 24px 52px 1fr 160px;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  box-sizing: border-box;
}

/* Col 1 */
.wpmf-col-check {
  display: flex;
  align-items: center;
  justify-content: center;
}

.wpmf-product-select {
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
  accent-color: #28a745;
  flex-shrink: 0;
}

/* Col 2 */
.wpmf-col-img {
  display: flex;
  align-items: center;
}

.wpmf-product-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #eee;
  display: block;
}

/* Col 3 */
.wpmf-col-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.wpmf-col-meta strong {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

.wpmf-col-meta small {
  font-size: 12px;
  color: #666;
  line-height: 1.3;
  display: block;
  margin: 0;
}

/* Col 4 — always present, empty for simple products */
.wpmf-col-select {
  display: flex;
  align-items: center;
  min-width: 0;
}

.wpmf-select-wrap {
  position: relative;
  width: 100%;
}

.wpmf-variation-selector {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background: #f9fafb;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  padding: 6px 26px 6px 10px;
  font-size: 12px;
  color: #374151;
  cursor: pointer;
  outline: none;
  box-sizing: border-box;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.wpmf-variation-selector:focus {
  border-color: #28a745;
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.wpmf-select-arrow {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: #6b7280;
  display: flex;
  align-items: center;
}

/* Checkout button */
#wpmf-checkout-btn {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 13px;
  background: #28a745;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  box-sizing: border-box;
  transition:
    background 0.2s,
    transform 0.15s;
  text-align: center;
}

#wpmf-checkout-btn:hover {
  background: #218838;
  transform: translateY(-1px);
}

#wpmf-checkout-btn:active {
  transform: translateY(0);
}

#wpmf-checkout-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  transform: none;
}
#wpmf-multistep-form {
  background: #ffffff;
  padding: 30px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  max-width: 600px; /* Constrain width for a better feel */
  margin: 30px auto;
}

#wpmf-step-content {
  min-height: 250px; /* Prevent layout jump */
}

.wpmf-step-container h3 {
  font-size: 1.8em;
  color: #333;
  margin-bottom: 25px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f0f0f0;
}

/* --- Standard Input Fields (.wpmf-form-group) --- */
.wpmf-form-group {
  margin-bottom: 20px;
}

.wpmf-form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: #555;
}

.wpmf-form-group input[type="number"],
.wpmf-form-group input[type="text"] {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
  font-size: 1em;
  transition: border-color 0.2s;
}

.wpmf-form-group input[type="number"]:focus,
.wpmf-form-group input[type="text"]:focus {
  border-color: #007bff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

/* --- Radio Button Group (.wpmf-radio-group) --- */
.wpmf-radio-group {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 15px;
}

.wpmf-radio-option {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  transition:
    background-color 0.2s,
    border-color 0.2s;
}

.wpmf-radio-option:hover {
  background-color: #f8f9fa;
  border-color: #007bff;
}

.wpmf-radio-option input[type="radio"] {
  margin-right: 12px;
  /* Optional: Hide default radio for custom styling, otherwise style the default */
}

.wpmf-radio-option label {
  flex-grow: 1;
  font-weight: normal;
  margin-bottom: 0;
  cursor: pointer;
}

/* --- BMI Result Display --- */
.bmi-result-display {
  margin-top: 30px;
  padding: 20px;
  border: 1px solid #a2d2ff;
  border-radius: 6px;
  background: #e6f7ff;
}

.bmi-result-display h4 {
  margin-top: 0;
  color: #007bff;
}

/* --- Form Controls (Buttons) --- */
#wpmf-form-controls {
  display: flex;
  justify-content: flex-end; /* Align buttons to the right */
  gap: 10px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #f0f0f0;
}

#wpmf-prev-btn,
#wpmf-next-btn,
#wpmf-checkout-btn {
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color 0.2s,
    border-color 0.2s,
    opacity 0.2s;
}

#wpmf-next-btn {
  background-color: #007bff; /* Primary action color */
  color: white;
  border: 1px solid #007bff;
}

#wpmf-next-btn:hover:not(:disabled) {
  background-color: #0056b3;
  border-color: #0056b3;
}

#wpmf-prev-btn {
  background-color: #f8f9fa;
  color: #6c757d;
  border: 1px solid #ced4da;
}

#wpmf-prev-btn:hover:not(:disabled) {
  background-color: #e2e6ea;
}

#wpmf-prev-btn:disabled,
#wpmf-next-btn:disabled,
#wpmf-checkout-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* --- Progress Bar (Sleek Minimalist Redesign) --- */
#wpmf-progress-container {
  width: 100%;
  height: 15px; /* Very thin, elegant line */
  background-color: #f0f0f0;
  border-radius: 10px;
  margin: 40px 0 20px 0; /* Space for the text ABOVE the bar */
  position: relative;
  overflow: visible; /* Allow text to sit outside the bar */
}

#wpmf-progress-bar {
  height: 100%;
  width: 0%;
  background-color: #ff0084; /* Sophisticated Black or your primary brand color */
  border-radius: 10px;
  transition: width 0.6s cubic-bezier(0.65, 0, 0.35, 1);
  position: relative;
}

/* Creating a "Glow" effect at the tip of the progress */
#wpmf-progress-bar::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background: #000;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#wpmf-progress-text {
  position: absolute;
  top: -25px; /* Moves text ABOVE the bar */
  right: 0; /* Aligns text to the right side */
  color: #888;
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.5px;
  font-family: sans-serif;
}

/* --- Recommendation Card Styling --- */
.wpmf-recommendation-card {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.wpmf-recommendation-card h4 {
  color: #28a745;
}

.wpmf-product-image img {
  max-width: 150px;
  height: auto;
  border-radius: 4px;
  margin: 15px 0;
}

#wpmf-checkout-btn {
  background-color: #ffc107; /* Warning/Call-to-action color */
  color: #333;
  border: 1px solid #ffc107;
  margin-top: 15px;
  width: 100%; /* Make checkout button wide */
}

#wpmf-checkout-btn:hover:not(:disabled) {
  background-color: #e0a800;
  border-color: #e0a800;
}

/* =====================================================
 * EMAIL VERIFICATION BLOCK
 * ===================================================== */
#wpmf-verify-block {
    background: #fafafa;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 18px 20px;
    margin-bottom: 20px;
}

#wpmf-verify-block p {
    margin: 0 0 8px;
    line-height: 1.5;
}

#wpmf-verify-email {
    font-size: 14px;
}

#wpmf-verify-code-input {
    font-size: 22px !important;
    letter-spacing: 6px;
    text-align: center;
    font-weight: 700;
    max-width: 160px !important;
    transition: border-color .2s;
}

#wpmf-verified-banner {
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
}

#wpmf-send-code-msg,
#wpmf-check-code-msg {
    min-height: 18px;
    font-size: 13px;
    line-height: 1.4;
}

#wpmf-login-form-wrap,
#wpmf-register-form-wrap {
    margin-top: 16px;
    border-top: 1px solid #e2e8f0;
    padding-top: 16px;
}
