/* =====================================================================
   Tenant Signup - Branding section (Views/Home/_SignupBranding.cshtml)
   Ported from FCSCom ThemeSetting/Index.cshtml "BRANDING REDESIGN" styles.

   Signup-specific changes:
     - --primary-color / --secondary-color / --for-company-logo-primary-color are set on
       #brandingRedesign (signup-branding.js) from the colors the tenant is choosing, so the
       previews show the tenant's colors without re-theming the rest of the signup page.
     - Preview Mode has Dark / Light only (no Glossy theme on the signup page).
     - Empty previews are hidden instead of showing a broken image.
   ===================================================================== */
#brandingRedesign img[src=""] {
    visibility: hidden;
}

.branding-redesign {
    --primary-color: #303F5E;
    --secondary-color: #4C95BE;
    --for-company-logo-primary-color: #303F5E;
    width: 100%;
    margin-top: 1rem;
}

    /* Nothing uploaded yet - hide the <img> rather than show a broken-image icon */
    .branding-redesign img[src=""],
    .branding-redesign img:not([src]) {
        visibility: hidden;
    }

.branding-page-heading {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    padding: 8px 0 18px;
}

    .branding-page-heading h4 {
        font-size: 24px;
        font-weight: 700;
    }

.branding-page-subtitle {
    color: #7f8ba3;
    font-size: 13px;
    margin-top: 5px;
}

.branding-page-actions {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.branding-preview-switch-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: space-between;
    padding: 9px 11px;
}

.branding-preview-label {
    font-size: 14px;
    font-weight: 600;
    color: #212529;
}

.branding-redesign:not(.preview-light) .branding-preview-label {
    color: #212529;
}

.branding-preview-switch {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 180px;
    height: 38px;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid #dee2e6;
    cursor: pointer;
    overflow: hidden;
    margin: 0;
}

.branding-preview-option {
    width: 50%;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    border: 0;
    border-radius: 18px;
    color: #aeb8ca;
    background: transparent;
    transition: .2s ease;
    cursor: pointer;
}

    .branding-preview-option.is-active {
        background: var(--primary-color) !important;
        color: #fff !important;
        box-shadow: 0 1px 5px rgba(0,0,0,.2) !important;
    }

    .branding-preview-option:not(.is-active) {
        background: transparent !important;
        color: #aeb8ca !important;
        box-shadow: none !important;
    }

.branding-redesign-card {
    border: 1px solid rgba(255,255,255,.125) !important;
    border-radius: 9px;
    background: #000;
    margin-bottom: 12px;
    overflow: hidden;
    grid-column: 1 / -1;
}

.preview-light .branding-redesign-card {
    border: 1px solid #dce2ea !important;
}

.branding-redesign-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #000;
    border-bottom: 1px solid rgba(255,255,255,.125) !important;
}

.preview-light .branding-redesign-section-title {
    border-bottom: 1px solid #dce2ea !important;
}

.branding-redesign-section-title h5 {
    font-size: 18px;
    font-weight: 700;
    color: #f4f7fb;
}

.branding-redesign-section-title span {
    display: block;
    margin-top: 2px;
    color: #b1b1b1;
    font-size: 11px;
}

.branding-application-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 12px;
}

.branding-logo-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.branding-asset-card {
    border: 1px solid rgba(255,255,255,.125) !important;
    border-radius: 8px;
    padding: 13px;
    background: #000;
    color: #f4f7fb;
    min-width: 0;
}

.modal-logo-section {
    margin-bottom: 12px;
}

.preview-light .branding-asset-card {
    border: 1px solid #dce2ea !important;
}

.branding-company-logo-card {
    grid-row: auto;
    align-self: start;
    height: fit-content;
    width: 100% !important;
}

.branding-asset-copy h6 {
    font-size: 14px;
    margin: 0 0 3px;
    font-weight: 700;
    color: #f7f9fc;
}

    .branding-asset-copy h6 i {
        color: #4c95be;
        font-size: 11px;
    }

.branding-help {
    color: #7f8ba3;
    font-size: 10px;
    display: block;
}

.company-logo-preview-shell {
    display: grid;
    grid-template-columns: repeat(1,1fr);
    gap: 8px;
    margin-top: 12px;
}

.company-logo-preview {
    min-height: 140px;
    border-radius: 8px;
    border: 1px solid rgb(32 32 32) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 30px 10px 15px;
}

.branding-redesign.preview-light .company-logo-preview {
    border: 1px solid rgb(220 226 234) !important;
}

.company-logo-preview.mode-light {
    background: #fff;
}

.company-logo-preview.mode-primary {
    background: var(--primary-color);
}

.branding-redesign.preview-light .company-logo-preview.mode-primary {
    background: var(--for-company-logo-primary-color);
}

.company-logo-preview.mode-secondary {
    background: var(--secondary-color);
}

.company-logo-preview.mode-shiny-black {
    background: #000 !important;
}
/* Primary/Secondary cards sit on a tenant color of any luminance: the logo variant is picked by
   LogoResolver from the actual rendered color, and stays hidden until it has been resolved. */
.company-logo-preview.mode-primary img,
.company-logo-preview.mode-secondary img {
    opacity: 0;
    transition: opacity .15s ease;
}

    .company-logo-preview.mode-primary img.logo-bg-resolved,
    .company-logo-preview.mode-secondary img.logo-bg-resolved {
        opacity: 1;
    }

.company-logo-preview img,
.company-logo-preview img.allImageLogo {
    width: auto;
    height: auto;
    max-width: 212px !important;
    max-height: 100%;
    object-fit: contain;
}

.branding-preview-background-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.branding-mini-preview-btn {
    border: 1px solid rgba(255,255,255,.125) !important;
    background: transparent;
    color: #fff;
    border-radius: 5px;
    padding: 5px 12px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.1s linear;
}

.preview-light .branding-mini-preview-btn {
    border: 1px solid #dce2ea !important;
    background: transparent;
    color: #000;
}

.branding-mini-preview-btn:hover {
    border-color: var(--secondary-color);
    color: #fff;
    background: var(--secondary-color);
}

.branding-mini-preview-btn.active {
    border-color: var(--primary-color);
    color: #fff;
    background: var(--primary-color);
}

.branding-asset-footer {
    margin-top: 2px;
    padding-top: 12px;
}

    .branding-asset-footer .form-check-input,
    .branding-choice .form-check-input {
        position: static !important;
        margin: 0 7px 0 0 !important;
    }

.branding-choice {
    display: inline-flex;
    align-items: center;
}

    .branding-asset-footer label, .branding-choice label {
        color: #dbe3ef;
        font-size: 11px;
    }

.branding-upload-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

    .branding-upload-actions .btn-sideMenuLogo {
        margin-bottom: 10px;
    }

    .branding-upload-actions .btn {
        font-size: 12px;
        border-radius: 5px;
        padding: 6px 11px;
    }

.branding-section-side-rail-col {
    display: inline-flex !important;
    width: 100% !important;
}

.branding-dark-upload-section {
    margin-top: 12px;
}

/* ---------- Favicon card ---------- */
.branding-favicon-card {
    grid-column: 2;
    grid-row: auto;
    --fav-line: #303949;
    --fav-panel: #0b0f16;
    --fav-muted: #7f8ba3;
    --fav-text: #dbe3ef;
}

.preview-light .branding-favicon-card {
    --fav-line: #dce2ea;
    --fav-panel: #f7f9fc;
    --fav-muted: #687386;
    --fav-text: #303846;
}

.favicon-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    border-radius: 7px;
}

    .favicon-toggle .form-check-input {
        position: static !important;
        margin: 0 !important;
        flex: 0 0 auto;
    }

    .favicon-toggle label {
        margin: 0;
        font-size: 11px;
        color: var(--fav-text);
        cursor: pointer;
        line-height: 1.3;
    }

.favicon-variants {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.favicon-variant {
    border: 1px solid var(--fav-line);
    border-radius: 8px;
    padding: 10px 12px 12px;
    background: var(--fav-panel);
}

.favicon-card:not(.is-separate) .favicon-variant[data-variant="dark"] {
    display: none;
}

.favicon-variant-head {
    display: none;
    align-items: center;
    gap: 9px;
    margin-bottom: 8px;
}

.favicon-card.is-separate .favicon-variant-head {
    display: flex;
}

.favicon-variant-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: var(--fav-text);
    line-height: 1.2;
}

.favicon-variant-sub {
    font-size: 10px;
    color: var(--fav-muted);
    line-height: 1.3;
}

.favicon-browser-label {
    display: block;
    font-size: 9px;
    font-weight: 600;
    color: var(--fav-muted, #7f8ba3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 4px;
}

.favicon-browser-preview {
    border: 1px solid #3a4454;
    border-radius: 7px;
    overflow: hidden;
    background: #111722;
}

.favicon-browser-tab {
    height: 30px;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0 7px;
    background: #1d2430;
    font-size: 10px;
    color: #dbe3ef;
}

.favicon-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ef6b6b;
    display: inline-block;
}

    .favicon-dot:nth-child(2) {
        background: #f4c15b;
    }

    .favicon-dot:nth-child(3) {
        background: #5ac76d;
    }

.favicon-tab-icon {
    width: 17px;
    height: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    border-radius: 3px;
}

    .favicon-tab-icon img {
        width: auto;
        height: auto;
        max-width: 15px;
        max-height: 15px;
        object-fit: contain;
    }

.favicon-tab-title {
    flex: 1;
}

.favicon-tab-close {
    font-size: 13px;
}

.favicon-browser-address {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    background: #10151e;
    color: #7f8ba3;
    font-size: 8px;
}

    .favicon-browser-address span {
        flex: 1;
        background: #1a212c;
        border-radius: 4px;
        padding: 3px 7px;
    }

.favicon-card.is-separate .favicon-variant[data-variant="light"] .favicon-browser-preview {
    border-color: #cfd6e0;
    background: #f4f6fa;
}

.favicon-card.is-separate .favicon-variant[data-variant="light"] .favicon-browser-tab {
    background: #e3e8ef;
    color: #303846;
}

.favicon-card.is-separate .favicon-variant[data-variant="light"] .favicon-browser-address {
    background: #f4f6fa;
    color: #7b8598;
}

    .favicon-card.is-separate .favicon-variant[data-variant="light"] .favicon-browser-address span {
        background: #fff;
    }

.favicon-variant-body {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 12px;
}

.favicon-swatch {
    position: relative;
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--fav-line);
    overflow: hidden;
}

    .favicon-swatch img {
        width: auto !important;
        height: auto !important;
        max-width: 40px !important;
        max-height: 40px !important;
        object-fit: contain;
    }

    .favicon-swatch.is-dark {
        background-color: #1a1a2e;
        background-image: linear-gradient(45deg, #2a2a45 25%, transparent 25%), linear-gradient(-45deg, #2a2a45 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #2a2a45 75%), linear-gradient(-45deg, transparent 75%, #2a2a45 75%);
        background-size: 8px 8px;
        background-position: 0 0, 0 4px, 4px -4px, -4px 0;
    }

.favicon-variant-actions {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    max-width: 210px;
}

    .favicon-variant-actions .btn {
        font-size: 12px;
        border-radius: 5px;
        padding: 6px 11px;
        width: 100%;
    }

    .favicon-variant-actions .branding-remove-bg-btn {
        font-size: 12px !important;
    }

/* Upload + Restore side by side; Upload fills the row while Restore is hidden */
.favicon-upload-row {
    display: flex;
    gap: 6px;
}

    .favicon-upload-row .btn {
        width: auto;
        flex: 1 1 auto;
        white-space: nowrap;
    }

    .favicon-upload-row .js-restore-brand {
        flex: 0 0 auto;
    }

.favicon-bg-remove-status {
    font-style: italic;
}

.favicon-variant-actions .favicon-bg-remove-status {
    line-height: 1.35;
}

.favicon-placeholder {
    display: none;
    color: var(--fav-muted);
    font-size: 14px;
}

.favicon-tab-icon .favicon-placeholder {
    font-size: 11px;
}

.is-broken > img.js-fav-img {
    display: none;
}

.is-broken > .favicon-placeholder {
    display: inline-block;
}

.favicon-transparent-bg {
    background-image: linear-gradient(45deg, #e0e0e0 25%, transparent 25%), linear-gradient(-45deg, #e0e0e0 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #e0e0e0 75%), linear-gradient(-45deg, transparent 75%, #e0e0e0 75%);
    background-size: 8px 8px;
    background-position: 0 0, 0 4px, 4px -4px, -4px 0;
    background-color: #fff;
    border-radius: 5px;
    padding: 8px;
}

.preview-light .favicon-transparent-bg {
    background-image: linear-gradient(45deg, #ccc 25%, transparent 25%), linear-gradient(-45deg, #ccc 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #ccc 75%), linear-gradient(-45deg, transparent 75%, #ccc 75%);
}

.favicon-context {
    margin-top: 12px;
}

.favicon-context-preview-row {
    display: flex;
    gap: 8px;
}

.favicon-context-preview {
    flex: 1;
    min-height: 58px;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--fav-line);
    padding: 8px;
    gap: 5px;
}

    .favicon-context-preview.mode-light {
        background: #fff;
    }

    .favicon-context-preview.mode-dark {
        background: #1a1a2e;
    }

    .favicon-context-preview img {
        width: auto;
        height: auto;
        max-width: 28px;
        max-height: 28px;
        object-fit: contain;
    }

    .favicon-context-preview span {
        font-size: 9px;
        font-weight: 600;
    }

    .favicon-context-preview.mode-light span, .favicon-context-preview.mode-light .favicon-placeholder {
        color: #687386;
    }

    .favicon-context-preview.mode-dark span, .favicon-context-preview.mode-dark .favicon-placeholder {
        color: #aeb8ca;
    }

/* ---------- Modal logo ---------- */
.branding-secondary-asset-card {
    grid-column: 1 / -1;
}

.branding-secondary-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

    .branding-secondary-row .btn-logoModal {
        font-size: 12px !important;
    }

.branding-secondary-label {
    min-width: 140px;
    font-size: 11px;
    color: #dbe3ef;
}

.logo-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.branding-modal-logo-preview {
    width: 106px;
    height: 40px;
}

    .branding-modal-logo-preview img {
        max-height: 41px;
        max-width: 100px
    }

.branding-modal-preview-mockup {
    border: 1px solid #202020;
    border-radius: 7px;
    overflow: hidden;
    margin-top: 10px;
}

.preview-light .branding-modal-preview-mockup {
    border-color: #dce2ea;
    background: #f7f9fc;
}

.modal-mockup-header {
    padding: 16px 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    background-color: transparent !important;
    background: transparent !important
}

.preview-light .modal-mockup-header {
    background-color: #fff;
}

.modal-mockup-header img {
    max-height: 40px;
    max-width: 120px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.modal-mockup-header span {
    font-size: 28px;
    font-weight: 500;
    color: #fff;
}

.preview-light .modal-mockup-header span {
    color: var(--primary-color);
}

.modal-mockup-body {
    padding: 48px 48px;
    background-color: #191d21;
    position: relative;
}

.preview-light .modal-mockup-body {
    background-color: #E9ECEF;
}

.modal-mockup-footer {
    background-color: #000 !important;
    border-top: 1px solid #343a40;
    padding: 10px 15px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.preview-light .modal-mockup-footer {
    background-color: #fff !important;
    border-top: 1px solid #dce2ea;
}

.modal-mockup-body p {
    font-size: 16px;
    font-weight: 400;
    color: #fff;
    margin: 0 0 8px;
}

.preview-light .modal-mockup-body p {
    color: #212529;
}

.modal-mockup-buttons {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}

    .modal-mockup-buttons span {
        font-size: 16px;
        padding: 6px 12px;
        border-radius: 3px;
        cursor: default;
        gap: 7px;
    }

.btn-modal-cancel {
    border: 1px solid var(--secondary-color);
    color: var(--secondary-color);
    background-color: transparent !important;
    display: flex;
    align-items: center;
    gap: 3px;
}

.preview-light .btn-modal-cancel {
    border: 1px solid var(--primary-color);
    color: #000;
}

.modal-mockup-step-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.modal-mockup-notice {
    font-size: 13px;
    margin: 0;
    flex: 1;
}

.modal-mockup-step-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.modal-mockup-step-label {
    font-size: 16px;
    color: #fff;
    white-space: nowrap;
}

.preview-light .modal-mockup-step-label {
    color: #212529;
}

.modal-mockup-preview-btn {
    background: var(--secondary-color);
    color: #fff;
    font-size: 16px;
    font-weight: 400;
    padding: 6px 14px;
    border-radius: 4px;
    cursor: default;
    white-space: nowrap;
}

.preview-light .modal-mockup-preview-btn {
    background: var(--primary-color);
}

.js-modal-company-logo-msg,
.js-admin-banner-help {
    padding-left: 23px;
}

.modal-mockup-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.modal-mockup-col-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--secondary-color);
    margin: 0 0 12px;
}

.preview-light .modal-mockup-col-title {
    color: var(--primary-color);
}

.modal-mockup-field {
    margin-bottom: 14px;
}

    .modal-mockup-field label {
        display: block;
        font-size: 16px;
        font-weight: 500;
        color: #fff;
        margin-bottom: 4px;
    }

.preview-light .modal-mockup-field label {
    color: #212529;
}

.modal-mockup-select {
    width: 100%;
    background: #000000;
    border: 1px solid #aaa;
    border-radius: 4px;
    padding: 8px 10px;
    font-size: 12px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
    user-select: none;
}

.preview-light .modal-mockup-select {
    background: #fff;
    border: 1px solid #aaa;
    color: #98A2B3;
}

.select2-arrow-mock {
    position: relative;
    display: inline-block;
    width: 1px;
    height: 21px;
    flex-shrink: 0;
}

    .select2-arrow-mock b {
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        margin-left: -4px;
        margin-top: -2px;
        border-style: solid;
        border-width: 5px 4px 0 4px;
        border-color: #888 transparent transparent transparent;
    }

.modal-logo-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 8px;
    align-items: start;
    gap: 12px;
}

.modal-logo-col {
    min-width: 0;
}

.modal-logo-section .modal-logo-split > div {
    padding: 6px 16px;
}

.branding-redesign .modal-logo-col.card {
    background: transparent;
    border: 1px solid rgba(255,255,255,.125);
}

.branding-redesign.preview-light .modal-logo-col.card {
    border-color: #dce2ea;
}

.modal-dark-logo-preview {
    border-radius: 5px;
    padding: 2px;
}

.js-modal-dark-upload-section .btn-logoModalDark {
    font-size: 12px !important;
}

.js-modal-custom-upload-section .branding-secondary-label,
.js-modal-dark-upload-section .branding-secondary-label {
    min-width: 72px;
}

.modal-logo-section-button-wrapper {
    display: flex;
    gap: 11px;
}

.branding-secondary-row .branding-remove-bg-btn {
    font-size: 12px !important;
    padding: 6px 11px;
}

.branding-secondary-row .favicon-bg-remove-status {
    max-width: 148px;
}

/* ---------- Remove Background button ---------- */
.branding-remove-bg-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,.125) !important;
    color: #fff;
    font-size: 11px;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.1s linear;
}

    .branding-remove-bg-btn:hover {
        border-color: var(--secondary-color);
        color: #fff;
        background: var(--secondary-color);
    }

.preview-light .branding-remove-bg-btn {
    border: 1px solid #dce2ea !important;
    background: transparent;
    color: #fff;
}

    .preview-light .branding-remove-bg-btn:hover {
        border-color: var(--primary-color);
        color: #fff;
        background: var(--primary-color);
    }

.branding-remove-bg-btn.is-restore-mode {
    background: transparent !important;
    border: 1px solid rgba(255,255,255,.25) !important;
    color: rgba(255,255,255,.7) !important;
}

    .branding-remove-bg-btn.is-restore-mode:hover {
        border-color: rgba(255,255,255,.5) !important;
        color: #fff !important;
        background: rgba(255,255,255,.08) !important;
    }

.preview-light .branding-remove-bg-btn.is-restore-mode {
    border: 1px solid #cdd4de !important;
    color: #5a6577 !important;
    background: transparent !important;
}

    .preview-light .branding-remove-bg-btn.is-restore-mode:hover {
        border-color: #9aa5b8 !important;
        color: #3a4556 !important;
        background: rgba(0,0,0,.04) !important;
    }

/* ---------- Portal branding ---------- */
.branding-portal-grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 12px;
    padding: 12px;
}

.branding-portal-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(255,255,255,.125) !important;
    border-radius: 8px;
    background: #000;
}

.preview-light .branding-portal-card {
    border: 1px solid #dce2ea !important;
}

.branding-portal-preview {
    border: 1px solid rgb(32 32 32) !important;
    border-radius: 7px;
    min-height: 260px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    background: #000;
    color: #fff;
}

.branding-redesign.preview-light .branding-portal-preview {
    background: #fff;
    color: #212529;
    border: 1px solid #dce2ea !important;
}

    .branding-redesign.preview-light .branding-portal-preview .branding-login-field {
        background: rgba(0,0,0,.08);
        color: #333;
    }

.branding-redesign:not(.preview-light) .branding-portal-preview {
    background: #000;
    color: #fff;
}

    .branding-redesign:not(.preview-light) .branding-portal-preview .branding-login-field {
        background: rgb(38 38 38) !important;
        color: #ffffff !important;
    }

/* Explicit Light/Dark picked on a portal card (independent light/dark logos) */
.branding-portal-preview.bg-white {
    background: #fff !important;
    color: #333 !important;
}

    .branding-portal-preview.bg-white .branding-login-field {
        background: rgba(0,0,0,.08) !important;
        color: #333 !important;
    }

    .branding-portal-preview.bg-white .branding-login-button {
        color: #fff;
    }

.branding-portal-preview.bg-shiny-black {
    background: #000 !important;
    color: #fff !important;
}

    .branding-portal-preview.bg-shiny-black .branding-login-field {
        background: rgb(16 16 16) !important;
        color: #cdd4e0 !important;
    }

.branding-portal-preview-controls {
    margin-bottom: 8px;
    width:100% !important;
}

    .branding-portal-preview-controls .branding-mini-preview-btn {
        font-size: 12px;
        border-radius: 5px;
        padding: 6px 11px;
    }

.branding-login-logo-area {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 16px;
}

    .branding-login-logo-area img {
        max-height: 90px;
        max-width: 220px;
        width: auto;
        height: auto;
        object-fit: contain;
    }

.branding-portal-preview strong {
    font-size: 15px;
    margin-top: 4px;
}

.branding-portal-preview > span {
    font-size: 10px;
    opacity: .8;
    margin: 4px 0 14px;
}

.branding-login-field {
    width: 85%;
    background: rgb(16 16 16);
    border-radius: 4px;
    padding: 8px 10px;
    margin: 5px 0;
    color: #cdd4e0;
    font-size: 10px;
}

.branding-login-button {
    width: 85%;
    text-align: center;
    margin-top: 9px;
    padding: 8px;
    border-radius: 4px;
    background: var(--primary-color);
    color: #fff;
    font-size: 10px;
}

.branding-portal-controls h6 {
    font-size: 14px;
    color: #fff;
    margin: 2px 0 9px;
}

.branding-portal-controls p {
    color: #7f8ba3;
    font-size: 10px;
    line-height: 1.4;
    margin: 3px 0 12px 23px;
}

/* ---------- Email branding ---------- */
.branding-email-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    padding: 12px;
}

.branding-email-card {
    border: 1px solid rgba(255,255,255,.125) !important;
    border-radius: 8px;
    padding: 12px;
    background: #000;
    min-height: 175px;
}

.preview-light .branding-email-card {
    border: 1px solid #DEE2E6 !important;
}

.branding-email-card h6 {
    color: #f7f9fc;
    font-size: 14px;
    margin: 0 0 4px;
}

.branding-email-banner {
    width: auto;
    max-width: 100%;
    height: 105px;
    object-fit: contain;
    border-radius: 5px;
    margin: 10px 0;
    cursor: pointer;
    padding:20px 0px !important
}

.branding-email-inherit-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.branding-email-custom-upload .btn {
    font-size: 12px;
}

.email-banner-image {
    width: 100%;
    height: 89px !important;
    margin: 16px 0px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---------- Buttons / light preview surfaces ---------- */
.branding-redesign .form-check {
    padding-left: 0;
}

.branding-redesign .btn {
    background-color: var(--secondary-color) !important;
    border-color: var(--secondary-color) !important;
    color: #fff;
}

    .branding-redesign .btn:hover {
        background-color: var(--primary-color) !important;
        border-color: var(--primary-color) !important;
    }

.branding-redesign.preview-light .btn {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

    .branding-redesign.preview-light .btn:hover {
        background-color: var(--secondary-color) !important;
        border-color: var(--secondary-color) !important;
    }


.branding-redesign.preview-light .branding-remove-bg-btn {
    color: #fff !important;
}

.branding-redesign.preview-light .branding-redesign-card {
    background: #fff;
    border-color: #dce2ea;
}

.branding-redesign.preview-light .branding-redesign-section-title {
    background: #f7f9fc;
    border-color: #e1e6ed;
}
#emailLogoUploadModal .-modal-logo-card-heading-wrapper p {
    display: inline !important;
}
    .branding-redesign.preview-light .branding-redesign-section-title h5,
    .branding-redesign.preview-light .branding-asset-copy h6,
    .branding-redesign.preview-light .branding-portal-controls h6,
    .branding-redesign.preview-light .branding-email-card h6 {
        color: #202733;
    }

    .branding-redesign.preview-light .branding-redesign-section-title span,
    .branding-redesign.preview-light .branding-help,
    .branding-redesign.preview-light .branding-portal-controls p {
        color: #687386;
    }

.branding-redesign.preview-light .branding-asset-card,
.branding-redesign.preview-light .branding-portal-card,
.branding-redesign.preview-light .branding-email-card {
    background: #fff;
    border-color: #dce2ea;
    color: #212529;
}

.branding-redesign.preview-light .branding-asset-footer label,
.branding-redesign.preview-light .branding-choice label {
    color: #303846;
}

.branding-redesign.preview-light .branding-page-subtitle {
    color: #687386;
}

.branding-redesign.preview-light .branding-secondary-label {
    color: #303846;
}

.branding-sidemenu-row {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
    width: 100%;
}

.btn-sideMenuLogoDark {
    color: #fff !important;
}

/* ---------- Responsive ---------- */
@media (max-width: 1566px) {
    .modal-logo-section-button-wrapper {
        flex-direction: column;
    }

    .js-modal-custom-upload-section .branding-secondary-label,
    .js-modal-dark-upload-section .branding-secondary-label {
        min-width: 85px;
    }
}

@media (max-width: 1270px) {
    .modal-logo-split {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1200px) {
    .branding-portal-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 1100px) {
    .branding-page-heading {
        flex-direction: column;
    }

    .branding-page-actions {
        justify-content: flex-start;
    }

    .branding-application-grid {
        grid-template-columns: 1fr;
    }

    .branding-company-logo-card, .branding-favicon-card {
        grid-column: auto;
        grid-row: auto;
    }

    .branding-dark-upload-section {
        grid-column: auto;
        grid-row: auto;
    }

    .branding-portal-grid {
        grid-template-columns: 1fr;
    }

    .branding-email-grid {
        grid-template-columns: 1fr;
    }

    .branding-sidemenu-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .branding-secondary-row {
        flex-wrap: wrap;
    }

    .modal-mockup-columns {
        grid-template-columns: 1fr;
    }

    .modal-mockup-step-row {
        flex-direction: column;
    }

    .modal-mockup-body {
        padding: 24px;
    }

    .modal-mockup-header span {
        font-size: 20px;
    }
}

/* =====================================================================
   Sticky Preview Mode bar - the ONE Preview Mode control (same as Theme Settings'
   .preview-toggle-wrapper). It lives outside #brandingRedesign, so it is styled here
   against <body>, which signup-branding.js switches to body.bootstrap-dark.
   ===================================================================== */
.preview-toggle-wrapper {
    position: sticky;
    top: 0;
    z-index: 1050;
    background: #fff;
    margin-top: 1rem;
}

body.bootstrap-dark .preview-toggle-wrapper {
    background: #2C3138;
    border-color: #3a4048;
}

.preview-toggle-wrapper .branding-preview-switch-wrap {
    width: 100%;
}

body.bootstrap-dark .preview-toggle-wrapper .branding-preview-label {
    color: #fff;
}

body.bootstrap-dark .preview-toggle-wrapper .branding-preview-switch {
    background: #1f2328;
    border-color: #3a4048;
}

/* The sticky bar must not be clipped by a card/row wrapper around the form */
.preview-toggle-wrapper + .branding-redesign {
    margin-top: 0;
}

#brandingDefaultNote {
    background-color: #F1F5F9;
    border: 1px solid #CBD5E1;
    color: #334155;
}

.branding-redesign .js-email-bg-actions .branding-mini-preview-btn.is-disabled {
    opacity: .45;
    cursor: not-allowed;
}

.branding-redesign .js-email-bg-note {
    flex-basis: 100%;
    margin-top: 4px;
    font-size: 11px;
    opacity: .8;
}
/* Email upload-type chooser */
.email-upload-chooser {
    display: flex;
    gap: 6px;
    margin-top: 6px;
    flex-wrap: wrap;
    align-items: center;
}

    .email-upload-chooser .email-chooser-btn {
        font-size: 12px;
        border-radius: 5px;
        padding: 6px 11px;
    }
