/* Enquiry modal */
.enquiry-modal-dialog {
    max-width: 580px;
    margin: 0.75rem auto;
}

.enquiry-modal-content {
    overflow: visible;
    border-radius: 14px;
}

.enquiry-modal-body {
    position: relative;
    padding: 1.1rem 1.25rem 1.15rem;
    overflow: visible;
}

.enquiry-modal-close {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    z-index: 2;
    margin: 0;
}

.enquiry-modal-head {
    padding-right: 1.75rem;
    margin-bottom: 0.85rem;
}

.enquiry-modal-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--bmga-brand, #de2a1f);
}

.enquiry-modal-subtitle {
    margin-top: 0.15rem;
    font-size: 0.78rem;
    color: var(--bmga-text-muted, #6c757d);
}

.enquiry-label {
    margin-bottom: 0.2rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--bmga-text-muted, #374151);
}

.enquiry-control {
    min-height: 38px;
    padding: 0.4rem 0.65rem;
    font-size: 0.875rem;
    border-radius: 8px;
}

.enquiry-textarea {
    min-height: 58px;
    resize: none;
    line-height: 1.35;
}

.enquiry-phone-group {
    flex-wrap: nowrap;
}

.enquiry-country-code {
    flex: 0 1 48%;
    width: auto;
    max-width: 48%;
    min-width: 0;
    padding-right: 1.75rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.enquiry-country-code option {
    white-space: normal;
}

.enquiry-phone-input {
    flex: 1 1 52%;
    min-width: 0;
}

.enquiry-submit-btn {
    margin-top: 0.85rem;
    min-height: 42px;
    padding: 0.45rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 8px;
    background: var(--bmga-brand, #de2a1f);
    border-color: var(--bmga-brand, #de2a1f);
}

.enquiry-submit-btn:hover,
.enquiry-submit-btn:focus {
    background: var(--bmga-brand-hover, #c92419);
    border-color: var(--bmga-brand-hover, #c92419);
}

.enquiry-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(2px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 5;
    border-radius: 14px;
}

.enquiry-loading-text {
    margin-top: .75rem;
    font-weight: 600;
    color: var(--bmga-brand, #de2a1f);
}

.enquiry-loader { display: flex; gap: .35rem; }
.enquiry-loader .dot {
    width: .5rem; height: .5rem; border-radius: 50%;
    background: var(--bmga-brand, #de2a1f);
    animation: enquiry-bounce 1s infinite ease-in-out;
}
.enquiry-loader .dot:nth-child(2) { animation-delay: .1s; }
.enquiry-loader .dot:nth-child(3) { animation-delay: .2s; }

@keyframes enquiry-bounce {
    0%, 80%, 100% { transform: scale(0.7); opacity: .6; }
    40% { transform: scale(1); opacity: 1; }
}

.enquiry-loading .modal-body { pointer-events: none; }

#enquiry-modal .modal-dialog-scrollable .modal-body {
    max-height: none;
    overflow: visible;
}

@media (max-width: 575.98px) {
    .enquiry-modal-dialog {
        max-width: calc(100% - 1rem);
    }

    .enquiry-modal-body {
        padding: 0.95rem 0.9rem 1rem;
    }

    .enquiry-modal-head {
        margin-bottom: 0.7rem;
    }

    .enquiry-control {
        min-height: 40px;
    }
}

/* Quote modal (legacy variant) */
.quote-section,
.quote-section__shell {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

.quote-section__shell {
  max-width: none;
  padding: 0;
}

.quote-section:not(.quote-section--1b) .quote-section__card {
  width: 100%;
  max-width: 100%;
  border: 0;
  background: var(--bmga-surface, #fff);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.quote-section:not(.quote-section--1b) #quote-modal .section-heading {
  font-size: 1rem;
  color: var(--bmga-brand, #de2a1f);
  border-left: 3px solid var(--bmga-brand, #de2a1f);
  padding-left: 8px;
}

.quote-section:not(.quote-section--1b) #quote-modal .tab-btn {
  border: 1px solid var(--bmga-border, #ddd);
  border-radius: 8px;
  background: var(--bmga-surface-muted, #f8f9fa);
  padding: 6px 14px;
  transition: background 0.3s, color 0.3s;
}

.quote-section:not(.quote-section--1b) #quote-modal .tab-btn.active,
.quote-section:not(.quote-section--1b) #quote-modal .tab-btn:hover {
  background: var(--bmga-brand, #de2a1f);
  color: #fff;
}

.quote-section:not(.quote-section--1b) #quote-modal .tab-pane {
  outline: 0;
}

.quote-section:not(.quote-section--1b) .filled-tab {
  box-shadow: inset 0 0 0 2px #198754;
}

.quote-section:not(.quote-section--1b) .dark-mode .form-select {
  background-color: transparent;
  border: 1px solid rgb(23, 34, 44);
  transition: background-color 0.2s, color 0.2s;
  appearance: none;
}

.quote-section:not(.quote-section--1b) .dark-mode .form-select option {
  background-color: #252525;
  color: #fff;
}

.quote-section:not(.quote-section--1b) .form-select-wrapper {
  position: relative;
  display: inline-block;
}

.quote-section:not(.quote-section--1b) .form-select-wrapper::after {
  content: "▾";
  position: absolute;
  right: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: #bdbdbd;
}

.quote-section:not(.quote-section--1b) .dark-mode .form-select-wrapper::after {
  color: var(--bmga-border, #ddd);
}

@media (max-width: 991.98px) {
  .quote-section:not(.quote-section--1b) .quote-section__shell {
    max-width: 100%;
    padding: 0 0.75rem;
  }

  .page-home .home-quote-section {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .quote-section:not(.quote-section--1b) .quote-section__card .modal-header {
    padding: 1.25rem 1rem 0.75rem;
  }

  .quote-section:not(.quote-section--1b) .quote-section__card .modal-body {
    padding: 1rem !important;
  }

  .quote-section:not(.quote-section--1b) .quote-service-tabs {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem !important;
    justify-content: stretch !important;
  }

  .quote-section:not(.quote-section--1b) #quote-modal .tab-btn {
    width: 100%;
    justify-content: center;
    padding: 0.65rem 0.5rem;
    font-size: 0.8125rem;
  }

  .quote-section:not(.quote-section--1b) #quote-modal .form-control,
  .quote-section:not(.quote-section--1b) #quote-modal .form-select {
    min-height: 44px;
    font-size: 1rem;
  }
}

@media (max-width: 575.98px) {
  .quote-section:not(.quote-section--1b) .quote-section__shell {
    padding: 0 0.5rem;
  }
}

/* Auth modals on public pages (login, register, password) */
.bmga-design-1b .auth-modal-1b {
  border: 1.5px solid var(--home-1b-border, var(--bmga-border)) !important;
  border-radius: 20px !important;
  box-shadow: 0 20px 60px rgba(28, 20, 20, 0.14) !important;
  overflow: hidden;
}

.bmga-design-1b .auth-modal-1b .modal-body h5 {
  font: 700 22px var(--home-1b-font-display, var(--bmga-font-display));
  color: var(--home-1b-ink, var(--bmga-text));
}

.bmga-design-1b .auth-modal-1b .modal-body > form > .text-center p,
.bmga-design-1b .auth-modal-1b .modal-body > form > .text-center.border-bottom p,
.bmga-design-1b .auth-modal-1b .modal-body > form > .border-bottom p {
  color: var(--home-1b-muted-2, var(--bmga-text-muted));
  font-size: 14px;
}

.bmga-design-1b .auth-modal-1b .alert-danger {
  border-radius: 10px;
  font-size: 13.5px;
}

.bmga-design-1b .auth-modal-1b .form-label {
  font: 600 13px var(--home-1b-font-body, var(--bmga-font-body));
  color: var(--home-1b-ink, var(--bmga-text));
}

.bmga-design-1b .auth-modal-1b .form-control {
  border: 1.5px solid var(--home-1b-input-border, var(--bmga-border)) !important;
  border-radius: 10px !important;
  min-height: 46px;
}

.bmga-design-1b .auth-modal-1b .btn-primary {
  background: var(--home-1b-brand, var(--bmga-brand)) !important;
  border-color: var(--home-1b-brand, var(--bmga-brand)) !important;
  border-radius: 10px !important;
  font-weight: 600;
}

.bmga-design-1b .auth-modal-1b .btn-primary:hover {
  background: var(--home-1b-brand-dark, var(--bmga-brand-dark)) !important;
  border-color: var(--home-1b-brand-dark, var(--bmga-brand-dark)) !important;
}

.bmga-design-1b .auth-modal-1b .btn-light {
  border: 1.5px solid var(--home-1b-border, var(--bmga-border)) !important;
  border-radius: 10px !important;
  background: #fff !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem;
  min-height: 46px;
  font-weight: 600;
  color: var(--home-1b-ink, var(--bmga-text)) !important;
}

.bmga-design-1b .auth-modal-1b .btn-light img {
  flex-shrink: 0;
  max-width: 20px;
  max-height: 20px;
  margin: 0 !important;
  float: none !important;
  position: static !important;
}

.bmga-design-1b .auth-modal-1b .link-primary,
.bmga-design-1b .auth-modal-1b .login-or .span-or {
  color: var(--home-1b-brand, var(--bmga-brand)) !important;
}

.bmga-design-1b #login-modal .modal-header button,
.bmga-design-1b #register-modal .modal-header button,
.bmga-design-1b #forgot-modal .modal-header a {
  color: var(--home-1b-muted-2, var(--bmga-text-muted));
}
