/* ================================================================
   add-business.css  —  momNpop.us
   Plain CSS replacing Tailwind utility classes on the Add Business page.
   Brand green: #2d6a4f
   ================================================================ */

/* ------------------------------------------------------------------
   Page scaffold
   ------------------------------------------------------------------ */
.add-business {
    padding: 3rem 1rem;
    background: #f9fafb;
    min-height: 60vh;
}

.add-business__container {
    max-width: 600px;
    margin: 0 auto;
}

.add-business__title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1f2937;
    text-align: center;
    margin: 0 0 2rem;
}

.add-business__card {
    background: #fff;
    padding: 1.75rem 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 5px rgba(0, 0, 0, .1);
}

.add-business__footer {
    font-size: 0.875rem;
    color: #6b7280;
    text-align: center;
    margin-top: 1.25rem;
    line-height: 1.5;
}

.add-business__footer a {
    color: #2d6a4f;
    text-decoration: underline;
}


/* ------------------------------------------------------------------
   Form structure
   ------------------------------------------------------------------ */
.form-field {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.375rem;
}

.form-required {
    color: #dc2626;
    margin-left: 0.125rem;
}

.form-input,
.form-select,
.form-textarea {
    display: block;
    width: 100%;
    padding: 0.6875rem 0.875rem;
    font-size: 1rem;
    color: #111827;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    box-sizing: border-box;
    transition: border-color .15s, box-shadow .15s;
    line-height: 1.5;
    font-family: inherit;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #2d6a4f;
    box-shadow: 0 0 0 3px rgba(45, 106, 79, .18);
}

/* Suppress focus ring on non-interactive fields */
.form-input[readonly]:focus,
.form-input:disabled:focus {
    border-color: #d1d5db;
    box-shadow: none;
}

.form-input[readonly],
.form-input:disabled {
    background: #f3f4f6;
    color: #6b7280;
    cursor: default;
}

.form-input:disabled {
    cursor: not-allowed;
}

/* Error state applied by JS */
.form-input.input-error,
.form-select.input-error,
.form-textarea.input-error {
    border-color: #dc2626;
}

.form-error {
    display: block;
    font-size: 0.8125rem;
    color: #dc2626;
    margin-top: 0.25rem;
}

.form-help {
    font-size: 0.8125rem;
    color: #6b7280;
    margin-top: 0.25rem;
    line-height: 1.4;
}

.form-link {
    display: inline-block;
    font-size: 0.875rem;
    color: #2d6a4f;
    text-decoration: none;
    margin-top: 0.25rem;
}

.form-link:hover {
    text-decoration: underline;
}

/* Generic brand-coloured link used inside modal body text */
.link-brand {
    color: #2d6a4f;
    text-decoration: underline;
}


/* ------------------------------------------------------------------
   Error banner (above the form)
   ------------------------------------------------------------------ */
.form-error-container {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 0.375rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    color: #dc2626;
    font-size: 0.875rem;
}

.form-error-list {
    list-style: disc;
    padding-left: 1.25rem;
    margin: 0;
}


/* ------------------------------------------------------------------
   City / State / Zip inline row
   ------------------------------------------------------------------ */
.form-location-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 0.625rem;
}


/* ------------------------------------------------------------------
   Checkbox  (Direct-to-consumer)
   ------------------------------------------------------------------ */
.form-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
}

.form-checkbox {
    width: 1rem;
    height: 1rem;
    margin-top: 0.2rem;
    flex-shrink: 0;
    accent-color: #2d6a4f;
    cursor: pointer;
}


/* ------------------------------------------------------------------
   Business-park detected indicator (below Address field)
   ------------------------------------------------------------------ */
.business-park-info {
    display: none;          /* shown by JS */
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #374151;
}

.business-park-info a {
    color: #2d6a4f;
    text-decoration: underline;
    font-weight: 500;
}


/* ------------------------------------------------------------------
   Business-park detected modal / overlay (JS-injected)
   ------------------------------------------------------------------ */
.bp-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.bp-overlay__dialog {
    background: #fff;
    border-radius: 0.5rem;
    padding: 1.5rem;
    max-width: 480px;
    width: 100%;
}

.bp-overlay__title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 0.75rem;
    color: #1f2937;
}

.bp-overlay__body {
    color: #374151;
    font-size: 0.9375rem;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.bp-overlay__btn {
    background: #2d6a4f;
    color: #fff;
    border: none;
    border-radius: 0.375rem;
    padding: 0.5rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
}

.bp-overlay__btn:hover {
    background: #245c43;
}


/* ------------------------------------------------------------------
   Credentials section — shown only for new (not-logged-in) users
   ------------------------------------------------------------------ */
.credentials-section {
    background: #f0fdf4;
    border: 1.5px solid #2d6a4f;
    border-radius: 0.5rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
}

.credentials-section__header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.375rem;
}

.credentials-section__icon {
    font-size: 1.125rem;
    color: #2d6a4f;
}

.credentials-section__title {
    font-size: 1rem;
    font-weight: 600;
    color: #2d6a4f;
    margin: 0;
}

.credentials-section__desc {
    font-size: 0.875rem;
    color: #374151;
    line-height: 1.5;
    margin: 0 0 1rem;
}

.credentials-section .form-field:last-child {
    margin-bottom: 0;
}


/* ------------------------------------------------------------------
   Business limit notice (shown for regular logged-in users)
   ------------------------------------------------------------------ */
.business-limit-notice {
    background: #fffbeb;
    border: 1.5px solid #d97706;
    border-radius: 0.375rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
    color: #92400e;
    line-height: 1.5;
}

.business-limit-notice .bi {
    margin-right: 0.25rem;
}

.business-limit-notice a {
    color: #92400e;
    font-weight: 600;
    text-decoration: underline;
}

/* Stronger error variant — user has actually reached their limit */
.business-limit-notice--error {
    background: #fef2f2;
    border-color: #dc2626;
    color: #991b1b;
}

.business-limit-notice--error a {
    color: #991b1b;
}


/* ------------------------------------------------------------------
   Business-email section — shown for logged-in super users
   ------------------------------------------------------------------ */
.business-email-section {
    background: #fffbeb;
    border: 1.5px solid #d97706;
    border-radius: 0.5rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
}

.business-email-section .form-label {
    margin-bottom: 0.375rem;
}

.business-email-section__note {
    font-size: 0.8125rem;
    color: #92400e;
    margin-top: 0.5rem;
    line-height: 1.4;
}

.business-email-section__note .bi {
    margin-right: 0.25rem;
}


/* ------------------------------------------------------------------
   Character counter (description field)
   ------------------------------------------------------------------ */
.char-counter {
    display: block;
    font-size: 0.8125rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.char-counter--warning {
    color: #dc2626;
}


/* ------------------------------------------------------------------
   Help icon (next to field labels)
   ------------------------------------------------------------------ */
.help-icon {
    color: #2d6a4f;
    cursor: pointer;
    margin-left: 0.25rem;
    font-size: 0.875rem;
    vertical-align: middle;
}


/* ------------------------------------------------------------------
   Primary submit button (standalone, not Bootstrap)
   ------------------------------------------------------------------ */
.btn-submit {
    display: block;
    width: 100%;
    padding: 0.8125rem 1rem;
    background: #2d6a4f;
    color: #fff;
    border: none;
    border-radius: 0.375rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s;
    margin-top: 0.5rem;
    font-family: inherit;
}

.btn-submit:hover:not(:disabled) {
    background: #245c43;
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}


/* ------------------------------------------------------------------
   Brand-coloured Bootstrap button override (used in modals)
   ------------------------------------------------------------------ */
.btn-brand {
    background-color: #2d6a4f;
    border-color: #2d6a4f;
    color: #fff;
}

.btn-brand:hover,
.btn-brand:focus {
    background-color: #245c43;
    border-color: #245c43;
    color: #fff;
}

.btn-brand:active {
    background-color: #1d4d38 !important;
    border-color: #1d4d38 !important;
}


/* ------------------------------------------------------------------
   Attention / info box inside duplicate-address modal
   ------------------------------------------------------------------ */
#attentionText {
    display: none;          /* shown/hidden by JS inline style */
    background: #fefce8;
    border: 1.5px solid #2d6a4f;
    border-radius: 0.375rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    color: #1f2937;
    font-size: 0.875rem;
    line-height: 1.5;
}
