/* ─── Mentor Survey Custom Styles ──────────────────────────────────────── */
/* These styles work alongside the Jotform theme CSS for WordPress embed  */

#mentor-survey-wrapper {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Header */
.ms-header {
  text-align: center;
  margin-bottom: 30px;
  padding: 30px 20px;
  background: linear-gradient(135deg, #667eea11, #764ba211);
  border-radius: 12px;
  border: 1px solid #e0e0e0;
}
.ms-header h1 {
  font-size: 26px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 10px;
}
.ms-subtitle {
  font-size: 15px;
  color: #555;
  margin: 0;
  line-height: 1.5;
}

/* Fields */
.ms-field {
  margin-bottom: 24px;
  padding: 16px 20px;
  background: #fafbfc;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.ms-field:hover {
  border-color: #c5c5c5;
}
.ms-field.ms-has-error {
  border-color: #e74c3c;
  background: #fdf2f2;
}

/* Labels */
.ms-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 12px;
  line-height: 1.5;
}
.ms-asterisk {
  color: #e74c3c;
  font-weight: 700;
}

/* Matrix Grid Layout */
.ms-matrix-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 30px;
}

.ms-matrix-header-row {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  padding: 0 16px;
  margin-bottom: -8px;
}

.ms-matrix-header-label {
  font-size: 14px;
  font-weight: 700;
  color: #555;
  text-align: center;
  width: 40px;
}

.ms-matrix-row {
  display: flex;
  align-items: stretch;
  gap: 16px;
  flex-wrap: nowrap;
}

.ms-matrix-num-box {
  flex: 0 0 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: #333;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.ms-matrix-text-box {
  flex: 1;
  min-width: 250px;
  padding: 16px 20px;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  display: flex;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.ms-matrix-text-box .ms-label {
  margin-bottom: 0;
  font-weight: 400;
  font-size: 15px;
  color: #2c3e50;
  line-height: 1.5;
}

.ms-matrix-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 280px; /* fixed width for the 5 circles container */
}

.ms-matrix-radio-item {
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.ms-matrix-radio-item input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.ms-matrix-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #ccc;
  background: transparent;
  transition: all 0.2s ease;
}

.ms-matrix-radio-item:hover .ms-matrix-circle {
  transform: scale(1.05);
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.ms-matrix-radio-item input[type="radio"]:focus-visible + .ms-matrix-circle {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

.ms-matrix-radio-item input[type="radio"]:checked + .ms-matrix-circle {
  background-color: var(--checked-color, #667eea);
  border-color: var(--checked-color, #667eea) !important;
  box-shadow: 0 0 0 3px #fff inset;
}

.ms-hidden-mobile {
  visibility: hidden;
}

/* Error States for Matrix */
.ms-matrix-row.ms-has-error .ms-matrix-num-box,
.ms-matrix-row.ms-has-error .ms-matrix-text-box {
  border-color: #e74c3c;
  background-color: #fdf2f2;
}
.ms-matrix-error {
  flex: 0 0 100%;
  margin-top: 4px;
}

@media (max-width: 900px) {
  .ms-matrix-header-row { display: none; }
  .ms-matrix-row {
    flex-wrap: wrap;
    background: #fafbfc;
    padding: 16px;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    gap: 12px;
  }
  .ms-matrix-num-box {
    flex: 0 0 40px;
    height: 40px;
    display: inline-flex;
  }
  .ms-matrix-text-box {
    flex: 1;
    min-width: 0;
    border: none;
    padding: 0;
    box-shadow: none;
    background: transparent;
  }
  .ms-matrix-options {
    flex: 0 0 100%;
    margin-top: 8px;
    justify-content: space-around;
  }
}

/* Checkbox */
.ms-checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ms-checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
  font-size: 14px;
  color: #444;
}
.ms-checkbox-item:hover {
  background: #eef2ff;
}
.ms-checkbox-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #667eea;
  cursor: pointer;
  margin: 0;
}

/* Inputs & Textareas */
.ms-input,
.ms-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fff;
}
.ms-input:focus,
.ms-textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}
.ms-textarea {
  resize: vertical;
  min-height: 80px;
}
.ms-input {
  max-width: 300px;
}

/* Error Messages */
.ms-field-error {
  color: #e74c3c;
  font-size: 12px;
  font-weight: 500;
  margin-top: 8px;
}
.ms-error-summary {
  background: #fdf2f2;
  border: 1px solid #e74c3c;
  border-radius: 8px;
  padding: 14px 20px;
  margin-bottom: 20px;
  color: #c0392b;
  font-size: 14px;
  font-weight: 600;
}

/* Submit Button */
.ms-submit-wrapper {
  text-align: center;
  margin-top: 30px;
  padding: 20px 0;
}
.ms-submit-btn {
  display: inline-block;
  padding: 14px 48px;
  background: #075152;
  color: #F79520;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(7, 81, 82, 0.3);
}
.ms-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(7, 81, 82, 0.4);
}
.ms-submit-btn:active {
  transform: translateY(0);
}
.ms-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Thank You */
.ms-thank-you {
  text-align: center;
  padding: 60px 30px;
  background: linear-gradient(135deg, #667eea11, #764ba211);
  border-radius: 16px;
  border: 1px solid #e0e0e0;
}
.ms-thank-icon {
  font-size: 64px;
  margin-bottom: 16px;
}
.ms-thank-you h2 {
  font-size: 28px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 12px;
}
.ms-thank-you p {
  font-size: 15px;
  color: #555;
  line-height: 1.6;
  margin: 0 0 30px;
  max-width: 450px;
  margin-left: auto;
  margin-right: auto;
}

/* Responsive */
@media (max-width: 600px) {
  #mentor-survey-wrapper { padding: 10px; }
  .ms-header { padding: 20px 15px; }
  .ms-header h1 { font-size: 20px; }
  .ms-field { padding: 12px 14px; }
  .ms-submit-btn { width: 100%; padding: 14px; }
  .ms-input { max-width: 100%; }
}
