/* Merchant settings pages still built on plain Bootstrap forms (phase 119, audit L2).
 *
 * Their markup and JavaScript are unchanged; this sheet gives their inputs, buttons, tables,
 * cards and notices the storefront design system's look (storefront.css co-* components), so
 * the merchant area stops switching style between pages. It is linked only from those pages
 * and every rule is scoped to .ss-legacy, which they set on <body>'s content wrapper.
 */
.ss-legacy {
    max-width: 880px;
    margin: 0 auto 32px;
    font-size: 14px;
    color: #1e2a52;
}

/* Page body as one card, like the modern merchant pages. */
.ss-legacy .ss-legacy-card,
.ss-legacy .card {
    background: #fff;
    border: 1px solid #eef0f7;
    border-radius: 16px;
    box-shadow: 0 6px 22px rgba(30, 42, 82, .06);
}
.ss-legacy .ss-legacy-card { padding: 22px; }
.ss-legacy .card-body { padding: 20px; }

/* Fields */
.ss-legacy label { font-size: 12.5px; font-weight: 600; color: #48507a; margin-bottom: 6px; }
.ss-legacy .form-control,
.ss-legacy select,
.ss-legacy input[type=text],
.ss-legacy input[type=number],
.ss-legacy input[type=email],
.ss-legacy input[type=tel],
.ss-legacy textarea {
    height: auto;
    border: 1px solid #e2e6f0;
    border-radius: 10px;
    padding: 11px 13px;
    font-size: 14px;
    color: #222;
    background: #fff;
    box-shadow: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.ss-legacy .form-control:focus,
.ss-legacy select:focus,
.ss-legacy input:focus,
.ss-legacy textarea:focus {
    outline: none;
    border-color: var(--ss-primary, #3f51b5);
    box-shadow: 0 0 0 3px rgba(63, 81, 181, .12);
}
.ss-legacy .form-group { margin-bottom: 16px; }
/* Several of these pages size fields inline (style="height:30px;padding-left:5px"), which beats
   the rules above; a 30px box with 11px padding clips the text. Only size and padding are forced. */
.ss-legacy .form-control,
.ss-legacy select,
.ss-legacy input[type=text],
.ss-legacy input[type=number],
.ss-legacy input[type=email],
.ss-legacy input[type=tel] {
    height: auto !important;
    min-height: 44px;
    padding: 10px 13px !important;
    max-width: 100%;
}

/* Buttons: Bootstrap's blue/teal/green primaries become the storefront primary. */
.ss-legacy .btn {
    border-radius: 10px;
    padding: 10px 18px;
    font-weight: 600;
    font-size: 14px;
    border: 0;
    transition: background .15s ease, box-shadow .15s ease;
}
.ss-legacy .btn-sm { padding: 8px 14px; font-size: 13px; }
.ss-legacy .btn-primary,
.ss-legacy .btn-info,
.ss-legacy .btn-success {
    background: var(--ss-primary, #3f51b5);
    color: #fff;
}
.ss-legacy .btn-primary:hover,
.ss-legacy .btn-info:hover,
.ss-legacy .btn-success:hover {
    background: var(--ss-primary-dark, #2c3a94);
    color: #fff;
    box-shadow: 0 8px 20px rgba(63, 81, 181, .3);
}
.ss-legacy .btn-danger { background: #fdecea; color: #b71c1c; }
.ss-legacy .btn-danger:hover { background: #f9d6d2; color: #8e1414; }
.ss-legacy .btn-default,
.ss-legacy .btn-secondary,
.ss-legacy .btn-light {
    background: #fff;
    color: #48507a;
    border: 1px solid #e2e6f0;
}
.ss-legacy .btn:focus-visible { outline: 3px solid rgba(63, 81, 181, .35); outline-offset: 2px; }
.ss-legacy .btn:disabled { opacity: .6; box-shadow: none; }

/* Tables */
.ss-legacy table,
.ss-legacy .table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border: 1px solid #eef0f7 !important;
    border-radius: 12px;
    overflow: hidden;
}
.ss-legacy table th,
.ss-legacy .table th {
    background: #f5f7fc;
    color: #48507a;
    font-size: 11.5px;
    letter-spacing: .6px;
    text-transform: uppercase;
    font-weight: 700;
    border: 0 !important;
    padding: 11px 12px;
}
.ss-legacy table td,
.ss-legacy .table td {
    border: 0 !important;
    border-top: 1px solid #eef0f7 !important;
    padding: 11px 12px;
    vertical-align: middle;
}
.ss-legacy table tr { border: 0 !important; }

/* Notices */
.ss-legacy .alert { border: 0; border-radius: 12px; padding: 14px 16px; }
.ss-legacy .alert-info { background: #eef1fb; color: #2c3a94; }
.ss-legacy .alert-success { background: #e8f5ec; color: #1b6b36; }
.ss-legacy .alert-danger { background: #fdecea; color: #b71c1c; }
.ss-legacy .alert h3,
.ss-legacy .alert h4 { font-size: 16px; font-weight: 700; margin: 0 0 6px; }
.ss-legacy hr { border-color: #eef0f7; }

/* Modals opened from these pages */
.modal .modal-content { border: 0; border-radius: 16px; overflow: hidden; }
.modal .modal-header { border-bottom: 1px solid #eef0f7; }

@media (max-width: 560px) {
    .ss-legacy .ss-legacy-card { padding: 16px; }
    .ss-legacy .btn { width: 100%; margin-bottom: 8px; }
    .ss-legacy .btn-sm { width: auto; }
}
