/**
 * T20 NPL Registration Form & Contact Page Mobile-First CSS
 * Target Breakpoints: 320px, 360px, 375px, 390px, 414px, 430px, 768px, 1024px, 1366px+
 */

/* Form Wrapper & Card Container */
.npl-registration-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding: 24px 20px;
  max-width: 780px;
  margin: 20px auto;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: #1e293b;
}

@media (min-width: 640px) {
  .npl-registration-card {
    padding: 36px 32px;
    margin: 30px auto;
  }
}

.npl-form-header {
  text-align: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid #f1f5f9;
}

.npl-form-header h2,
.npl-form-header h3 {
  margin: 0 0 6px 0;
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.5px;
}

@media (min-width: 640px) {
  .npl-form-header h2,
  .npl-form-header h3 {
    font-size: 28px;
  }
}

.npl-form-header p {
  margin: 0;
  font-size: 14px;
  color: #64748b;
  line-height: 1.4;
}

/* Grid Layout */
.npl-form-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-sizing: border-box;
  width: 100%;
}

@media (min-width: 640px) {
  .npl-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 20px;
  }
}

.npl-col-full {
  grid-column: 1 / -1;
  width: 100%;
}

.npl-col-half {
  width: 100%;
}

/* Field Group & Labels */
.npl-field-group {
  display: flex;
  flex-direction: column;
  width: 100%;
  box-sizing: border-box;
}

.npl-field-group label,
.npl-form-label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 6px;
  line-height: 1.3;
}

.npl-sublabel {
  font-size: 12px;
  font-weight: 400;
  color: #64748b;
  margin-left: 4px;
}

.npl-required {
  color: #dc2626;
  font-weight: 700;
  margin-left: 2px;
}

/* Inputs, Selects & Form Controls */
.npl-registration-card input[type="text"],
.npl-registration-card input[type="email"],
.npl-registration-card input[type="tel"],
.npl-registration-card input[type="number"],
.npl-registration-card select,
.npl-form-control,
.wpcf7-form-control-wrap input,
.wpcf7-form-control-wrap select {
  width: 100% !important;
  max-width: 100% !important;
  min-height: 48px !important;
  height: 48px !important;
  padding: 10px 14px !important;
  font-size: 16px !important; /* 16px prevents iOS Safari auto-zoom */
  color: #0f172a !important;
  background-color: #f8fafc !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 8px !important;
  box-sizing: border-box !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease !important;
  outline: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
}

.npl-registration-card select,
.wpcf7-form-control-wrap select {
  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='%23475569' 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") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  background-size: 16px 16px !important;
  padding-right: 38px !important;
  cursor: pointer;
}

.npl-registration-card input:focus,
.npl-registration-card select:focus,
.wpcf7-form-control-wrap input:focus,
.wpcf7-form-control-wrap select:focus {
  background-color: #ffffff !important;
  border-color: #1a73e8 !important;
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.18) !important;
}

/* Role / Playing Type Radio Pills */
.npl-role-group .wpcf7-radio {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
}

@media (min-width: 640px) {
  .npl-role-group .wpcf7-radio {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
  }
}

.npl-role-group .wpcf7-list-item {
  margin: 0 !important;
  display: block !important;
}

.npl-role-group .wpcf7-list-item label {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 50px !important;
  padding: 10px 14px !important;
  background: #f8fafc !important;
  border: 2px solid #cbd5e1 !important;
  border-radius: 10px !important;
  font-size: 14.5px !important;
  font-weight: 600 !important;
  color: #334155 !important;
  cursor: pointer !important;
  text-align: center !important;
  box-sizing: border-box !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  user-select: none !important;
  position: relative !important;
}

.npl-role-group .wpcf7-list-item label:hover {
  background: #f1f5f9 !important;
  border-color: #94a3b8 !important;
}

.npl-role-group .wpcf7-list-item input[type="radio"] {
  margin-right: 8px !important;
  width: 18px !important;
  height: 18px !important;
  min-height: 18px !important;
  accent-color: #ffffff !important;
  cursor: pointer !important;
}

/* Clear, High-Contrast Selected/Active State */
.npl-role-group .wpcf7-list-item.is-selected label,
.npl-role-group .wpcf7-list-item.is-active label,
.npl-role-group .wpcf7-list-item label:has(input:checked),
.npl-role-group .wpcf7-list-item input[type="radio"]:checked + .wpcf7-list-item-label,
.npl-role-group .wpcf7-list-item input[type="radio"]:checked ~ span {
  font-weight: 700 !important;
}

.npl-role-group .wpcf7-list-item.is-selected label,
.npl-role-group .wpcf7-list-item.is-active label,
.npl-role-group .wpcf7-list-item label:has(input:checked) {
  background: #1a73e8 !important;
  border-color: #1a73e8 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(26, 115, 232, 0.35) !important;
  transform: translateY(-1px) !important;
}

.npl-role-group .wpcf7-list-item.is-selected label span,
.npl-role-group .wpcf7-list-item.is-active label span,
.npl-role-group .wpcf7-list-item label:has(input:checked) span {
  color: #ffffff !important;
}

/* Terms Checkbox */
.npl-terms-group {
  margin-top: 6px;
}

.npl-terms-group .wpcf7-checkbox label {
  display: flex !important;
  align-items: flex-start !important;
  gap: 8px !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  color: #334155 !important;
  cursor: pointer !important;
  line-height: 1.4 !important;
}

.npl-terms-group input[type="checkbox"] {
  width: 18px !important;
  height: 18px !important;
  min-height: 18px !important;
  margin-top: 2px !important;
  flex-shrink: 0 !important;
  accent-color: #1a73e8 !important;
}

.npl-terms-group a {
  color: #1a73e8 !important;
  font-weight: 600 !important;
  text-decoration: underline !important;
}

/* Submit Button */
.npl-submit-group {
  margin-top: 10px;
  width: 100%;
}

.npl-submit-btn,
.npl-registration-card input[type="submit"] {
  width: 100% !important;
  min-height: 52px !important;
  padding: 14px 24px !important;
  font-size: 17px !important;
  font-weight: 800 !important;
  letter-spacing: 0.5px !important;
  text-transform: uppercase !important;
  color: #ffffff !important;
  background: linear-gradient(135deg, #e10707 0%, #b70000 100%) !important;
  border: none !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  box-shadow: 0 4px 14px rgba(225, 7, 7, 0.35) !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.2s ease !important;
}

.npl-submit-btn:hover,
.npl-registration-card input[type="submit"]:hover {
  background: linear-gradient(135deg, #d00606 0%, #a00000 100%) !important;
  box-shadow: 0 6px 18px rgba(225, 7, 7, 0.45) !important;
  transform: translateY(-1px) !important;
}

.npl-submit-btn:active,
.npl-registration-card input[type="submit"]:active {
  transform: translateY(1px) !important;
  box-shadow: 0 2px 8px rgba(225, 7, 7, 0.3) !important;
}

.npl-submit-btn:disabled,
.npl-registration-card input[type="submit"]:disabled {
  opacity: 0.65 !important;
  cursor: not-allowed !important;
  transform: none !important;
}

/* CF7 Validation & Alert Messages */
.wpcf7-not-valid-tip {
  color: #dc2626 !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  margin-top: 4px !important;
  display: block !important;
}

.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output {
  background: #fef2f2 !important;
  border: 1.5px solid #f87171 !important;
  color: #991b1b !important;
  padding: 12px 16px !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  margin: 16px 0 0 0 !important;
}

.wpcf7 form.sent .wpcf7-response-output {
  background: #f0fdf4 !important;
  border: 1.5px solid #4ade80 !important;
  color: #166534 !important;
  padding: 12px 16px !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  margin: 16px 0 0 0 !important;
}

/* Responsive Google Map Wrap for Contact Page */
.npl-map-responsive-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 ratio */
  height: 0;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  margin-bottom: 24px;
}

.npl-map-responsive-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
}

/* Contact Info Card Styling */
.npl-contact-info-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px 20px;
  box-sizing: border-box;
  margin-top: 10px;
}

.npl-contact-info-card h2,
.npl-contact-info-card h3 {
  color: #0f172a !important;
  margin: 0 0 12px 0 !important;
}

.npl-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 14.5px;
  color: #334155;
  line-height: 1.4;
}

.npl-contact-item strong {
  color: #0f172a;
}
