/* ============================================================
   Black Spend – Frontend Styles  v2.0
   No show/hide JS anywhere. Add Business card is always visible.
   ============================================================ */

/* ── Container ────────────────────────────────────────────── */
.bs-form-container {
    max-width: 680px;
    margin: 0 auto;
    padding: 28px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.09);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    box-sizing: border-box;
}

.bs-form-title {
    margin: 0 0 26px;
    font-size: 1.5rem;
    color: #1f3464;
    border-bottom: 3px solid #1f3464;
    padding-bottom: 12px;
}

/* ── Form rows ────────────────────────────────────────────── */
.bs-form-row { margin-bottom: 20px; }
.bs-form-row-half { display: flex; gap: 16px; }
.bs-form-row-half .bs-form-field { flex: 1; min-width: 0; }

/* ── Labels ───────────────────────────────────────────────── */
.bs-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #222;
}
.bs-label .required { color: #c0392b; margin-left: 2px; }

/* ── Inputs & selects ─────────────────────────────────────── */
.bs-input,
.bs-select {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #ccd0d4;
    border-radius: 6px;
    color: #222;
    background: #fafafa;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.18s, box-shadow 0.18s;
    font-size: 16px;   /* prevents iOS auto-zoom */
}
.bs-input:focus,
.bs-select:focus {
    outline: none;
    border-color: #1f3464;
    box-shadow: 0 0 0 3px rgba(31,52,100,0.13);
    background: #fff;
}

/* ── "Add New Business" popup link ────────────────────────── */
.bs-popup-btn {
    display: block;
    margin-top: 10px;
    padding: 13px 16px;
    background: #f0f4ff;
    border: 2px dashed #1f3464;
    border-radius: 8px;
    color: #1f3464;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    min-height: 50px;
    line-height: 24px;
    transition: background 0.18s, border-color 0.18s;
}
.bs-popup-btn:hover  { background: #e4eaff; border-style: solid; }
.bs-popup-btn:active { background: #d5ddf0; }

/* Confirmation note shown after popup closes */
.bs-popup-confirm {
    margin-top: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #1e8449;
}

/* ── Checkboxes (main form ownership row) ─────────────────── */
.bs-checkbox-group {
    display: flex; gap: 18px; flex-wrap: wrap; margin-top: 4px;
}
.bs-checkbox-label {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.95rem; color: #333; cursor: pointer; min-height: 44px;
}
.bs-checkbox-label input[type="checkbox"] {
    width: 18px; height: 18px;
    accent-color: #1f3464; cursor: pointer; flex-shrink: 0;
}

/* ── Main Submit button ───────────────────────────────────── */
.bs-submit-button {
    width: 100%;
    padding: 15px;
    background: #1f3464;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.2s;
    min-height: 52px;
}
.bs-submit-button:hover  { background: #16275a; }
.bs-submit-button:active { background: #0f1e47; }
.bs-submit-button:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── Receipt dropzone ─────────────────────────────────────── */
.bs-dropzone {
    border: 2px dashed #c5d0ef; border-radius: 8px;
    padding: 28px 20px; text-align: center;
    background: #f8f9ff; cursor: pointer;
    transition: border-color 0.18s, background 0.18s; position: relative;
}
.bs-dropzone:hover, .bs-dropzone.dragover { border-color: #1f3464; background: #eef1fa; }
.bs-file-input-hidden {
    position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none;
}
.bs-dropzone-content { display: block; cursor: pointer; }
.bs-dropzone-icon    { font-size: 2.2rem; }
.bs-dropzone-content p { margin: 6px 0 0; font-size: 0.9rem; color: #555; }
.bs-dropzone-hint { font-size: 0.78rem !important; color: #999 !important; }
.bs-dropzone-preview { position: relative; display: inline-block; }
.bs-dropzone-preview img {
    max-width: 200px; max-height: 150px;
    border-radius: 4px; border: 1px solid #ccc;
}
.bs-remove-preview {
    position: absolute; top: -8px; right: -8px;
    background: #c0392b; color: #fff; border: none;
    border-radius: 50%; width: 26px; height: 26px;
    font-size: 15px; line-height: 26px; text-align: center;
    cursor: pointer; touch-action: manipulation; padding: 0;
}

/* ── Form messages ────────────────────────────────────────── */
.bs-messages { margin-top: 16px; font-size: 0.95rem; }
.bs-messages.bs-success {
    padding: 14px 16px; background: #eafaf1;
    border: 1px solid #a9dfbf; border-radius: 6px; color: #1e8449;
}
.bs-messages.bs-error {
    padding: 14px 16px; background: #fdedec;
    border: 1px solid #f1948a; border-radius: 6px; color: #922b21;
}

/* ── Mobile ───────────────────────────────────────────────── */
@media (max-width: 600px) {
    .bs-form-container { padding: 18px 16px; border-radius: 6px; box-shadow: none; }
    .bs-form-row-half  { flex-direction: column; gap: 0; }
    .bs-checkbox-group { gap: 12px; }
    .bs-toggle-group   { gap: 8px; }
}
