/* ==========================================================================
   Bodyline Sports - Modular Enquiry Form Modal Stylesheet
   Stand-Alone & Self-Contained (Zero dependency on external framework CSS)
   ========================================================================== */

/* Embedded Google Font fallback */
@import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:wght@400;500;600;700;800&display=swap');

/* Modal Overlay / Backdrop */
.bl-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(10, 15, 25, 0.65);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
              visibility 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.bl-modal-backdrop.bl-show {
  opacity: 1;
  visibility: visible;
}

/* Modal Dialog Box */
.bl-modal-card {
  font-family: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: #ffffff;
  width: 100%;
  max-width: 440px;
  border-radius: 20px;
  box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.35),
              0 0 0 1px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
  padding: 1.5rem 1.6rem 1.35rem 1.6rem;
  box-sizing: border-box;
  transform: scale(0.92) translateY(16px);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.bl-modal-backdrop.bl-show .bl-modal-card {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Close Button (X) */
.bl-modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background-color: transparent;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
  padding: 0;
}

.bl-modal-close-btn:hover {
  background-color: #f1f5f9;
  color: #0f172a;
  transform: rotate(90deg);
}

.bl-modal-close-btn svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.2;
}

/* Header Section */
.bl-modal-header {
  text-align: center;
  margin-bottom: 0.95rem;
}

.bl-modal-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: #0c192c;
  margin: 0 0 0.15rem 0;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.bl-modal-subtitle {
  font-size: 0.875rem;
  font-weight: 500;
  color: #5b6b82;
  margin: 0;
  line-height: 1.3;
}

/* Form Container & Fields */
.bl-enquiry-form {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  box-sizing: border-box;
}

.bl-input-group {
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.bl-input-field {
  width: 100%;
  height: 40px;
  padding: 0 0.95rem;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 400;
  color: #1e293b;
  background-color: #ffffff;
  border: 1.2px solid #d0d7de;
  border-radius: 9px;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.bl-input-field::placeholder {
  color: #8a99a8;
  font-weight: 400;
}

.bl-input-field:hover {
  border-color: #94a3b8;
}

.bl-input-field:focus {
  border-color: #e31b23;
  box-shadow: 0 0 0 3px rgba(227, 27, 35, 0.12);
  background-color: #ffffff;
}

/* Textarea Field */
textarea.bl-input-field.bl-textarea {
  height: 48px;
  min-height: 48px;
  max-height: 48px;
  padding: 0.45rem 0.95rem;
  resize: none;
  line-height: 1.35;
}

/* Checkbox Authorization Section */
.bl-consent-row {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-top: 0.1rem;
  margin-bottom: 0.25rem;
  cursor: pointer;
  user-select: none;
}

.bl-consent-checkbox-wrap {
  position: relative;
  flex-shrink: 0;
  margin-top: 1px;
}

.bl-consent-checkbox-wrap input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.bl-custom-checkbox {
  width: 15px;
  height: 15px;
  background-color: #ffffff;
  border: 1.6px solid #cbd5e1;
  border-radius: 3.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.bl-consent-checkbox-wrap input[type="checkbox"]:checked ~ .bl-custom-checkbox {
  background-color: #0066ff;
  border-color: #0066ff;
}

.bl-custom-checkbox svg {
  display: none;
  width: 10px;
  height: 10px;
  stroke: #ffffff;
  stroke-width: 3;
}

.bl-consent-checkbox-wrap input[type="checkbox"]:checked ~ .bl-custom-checkbox svg {
  display: block;
}

.bl-consent-text {
  font-size: 0.68rem;
  color: #5b6b82;
  line-height: 1.35;
  margin: 0;
}

/* Submit Button */
.bl-btn-submit {
  width: 100%;
  height: 44px;
  background: #e31b23;
  color: #ffffff;
  border: none;
  border-radius: 9px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  cursor: pointer;
  position: relative;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(227, 27, 35, 0.28);
  box-sizing: border-box;
  padding: 0 1.25rem;
}

.bl-btn-submit:hover {
  background: #cc141c;
  box-shadow: 0 6px 20px rgba(227, 27, 35, 0.4);
  transform: translateY(-1.5px);
}

.bl-btn-submit:active {
  transform: scale(0.99);
}

.bl-btn-submit:disabled {
  opacity: 0.75;
  cursor: not-allowed;
  transform: none;
}

/* Arrow Icon inside Button */
.bl-btn-icon-circle {
  width: 24px;
  height: 24px;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 0.8rem;
  margin-left: 2px;
  transition: transform 0.25s ease;
}

.bl-btn-submit:hover .bl-btn-icon-circle {
  transform: translateX(3px);
  background: rgba(255, 255, 255, 0.32);
}

.bl-btn-icon-circle svg {
  width: 13px;
  height: 13px;
  stroke: #ffffff;
  stroke-width: 2.8;
}

/* Spinner for Loading State */
.bl-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: bl-spin 0.7s linear infinite;
  display: inline-block;
}

@keyframes bl-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Standalone Toast / Feedback Alert */
.bl-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100000;
  pointer-events: none;
}

.bl-toast-message {
  font-family: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #10b981;
  color: #ffffff;
  padding: 0.85rem 1.25rem;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
  max-width: 380px;
}

.bl-toast-message.bl-show {
  opacity: 1;
  transform: translateY(0);
}

.bl-toast-message svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Fallback for ultra-short screens (Landscape mobile) */
@media (max-height: 560px) {
  .bl-modal-backdrop {
    align-items: flex-start;
    overflow-y: auto;
  }
  .bl-modal-card {
    margin: 1rem auto;
    overflow-y: visible;
  }
}

/* Responsive Mobile view */
@media (max-width: 575.98px) {
  .bl-modal-backdrop {
    padding: 0.75rem;
  }
  
  .bl-modal-card {
    border-radius: 18px;
    padding: 1.35rem 1.25rem 1.2rem 1.25rem;
    max-width: 100%;
  }
  
  .bl-modal-title {
    font-size: 1.4rem;
  }
  
  .bl-modal-subtitle {
    font-size: 0.8125rem;
  }

  .bl-input-field {
    height: 38px;
    font-size: 0.84rem;
  }

  .bl-btn-submit {
    height: 42px;
    font-size: 0.9rem;
  }
}
