/* Shared by standalone pages and their AJAX-rendered content. */
#page_content,
#kt_content,
#kt_wrapper,
#kt_content_container,
#index_content,
.card,
.card-body,
.row > *,
.d-flex > * {
    min-width: 0;
}

.table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-responsive:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* Preserve media proportions without constraining zoomable document viewers. */
img:not(.symbol img),
video:not(.video-js video) {
    max-width: 100%;
}

#page_content p,
#page_content h1,
#page_content h2,
#page_content h3,
#page_content .card-title,
.resource-card,
.modal-body {
    overflow-wrap: anywhere;
}

.walking-lottie-wrapper,
.page-loader-lottie {
    width: min(100%, 474px);
    height: auto;
    aspect-ratio: 474 / 413.73;
}

#kulu-conversion-wrapper {
    min-width: 0;
    max-width: 100%;
}

.navigation-arrows .progress-container,
.onboarding-page .navigation-arrows .progress-container {
    flex: 1 1 0;
    min-width: 0 !important;
    max-width: 540px !important;
}

@media (max-width: 767.98px) {
    .orange-btn-pad {
        padding-left: 1.25rem !important;
        padding-right: 1.25rem !important;
    }

    .ellipse-bg,
    .ellipse-small-bg,
    .ellipse-bg-2 {
        width: min(100%, 577px);
        left: 50%;
        transform: translateX(-50%);
    }

    .mw-276-67px {
        min-width: 0;
        max-width: 100%;
    }

    .modal-dialog {
        max-width: calc(100% - 1rem) !important;
        margin-left: auto;
        margin-right: auto;
    }

    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter {
        max-width: 100%;
    }

    .dataTables_wrapper .dataTables_filter label {
        display: flex;
        flex-wrap: wrap;
        gap: .5rem;
    }

    .dataTables_wrapper .dataTables_filter input {
        min-width: 0;
        max-width: 100%;
        margin-left: 0;
    }

    .pagination {
        flex-wrap: wrap;
    }
}

.lottie-wrapper {
    max-width: 100%;
}

.lottie-wrapper > div {
    max-width: 100%;
}

.onboarding-page .form-control {
    max-width: 100%;
}

/* Older theme buttons have a fixed minimum that exceeds narrow grid columns. */
.orange-btn-size {
    min-width: 0;
    max-width: 100%;
    height: auto;
    min-height: 52px;
    white-space: normal;
}

@media (max-width: 1024px) {
    .ellipse-bg,
    .ellipse-small-bg,
    .ellipse-bg-2 {
        width: min(100%, 577px);
        left: 50%;
        transform: translateX(-50%);
    }
}

/* Readable desktop typography; retain the existing mobile scale. */
@media (min-width: 992px) {
    html, body { font-size: 16px !important; }
    /* Undo the theme's universal 14px reset so text inherits its context. */
    * { font-size: inherit; }
    body { line-height: 1.6; }
    select option, select optgroup { font-size: inherit; }
    .form-label, .form-check-label { line-height: 1.5; }
    .fs-13px { font-size: .9286rem !important; }
    .fs-15px { font-size: 1.0714rem !important; }
    input::placeholder, textarea::placeholder, .sukulu-input::placeholder { font-size: inherit !important; }

    /* Larger rem text must not consume the header's space through its gutters. */
    #kt_app_header { padding-left: 24px !important; padding-right: 24px !important; }
    #kt_app_header_container { margin-left: auto !important; margin-right: auto !important; padding-left: 0; padding-right: 0; max-width: 1920px; }
    #kt_app_header_menu > .menu-item { margin-left: 2px !important; margin-right: 2px !important; }
    #kt_app_header_menu .menu-link { padding-left: 8px !important; padding-right: 8px !important; }
}
@media (min-width: 1600px) {
    html, body { font-size: 18px !important; }
}
@media (min-width: 2200px) {
    html, body { font-size: 20px !important; }
}
/* Give navigation a full row on narrower desktops instead of clipping labels. */
@media (min-width: 992px) and (max-width: 1399.98px) {
    #kt_app_body { --bs-app-header-height: 120px; --bs-app-header-height-actual: 120px; }
    #kt_app_header_container { display: grid !important; grid-template-columns: auto minmax(0,1fr); grid-template-rows: 60px 60px; align-items: center !important; }
    #kt_app_header_wrapper { display: contents !important; }
    #kt_app_header_container > a { grid-column: 1; grid-row: 1; }
    #kt_app_header_wrapper > .app-navbar { grid-column: 2; grid-row: 1; justify-self: end; }
    #kt_app_header_wrapper > .app-header-menu { grid-column: 1 / -1; grid-row: 2; width: 100%; }
    #kt_app_header_menu { justify-content: center; width: 100%; }
}

/* Dialog controls must grow with desktop text and translated/long labels. */
.modal .modal-dialog.mw-375px,
.modal .modal-dialog.mw-400px {
    width: calc(100% - 2rem);
    max-width: 28rem !important;
    margin-left: auto;
    margin-right: auto;
}
.modal .modal-content { max-height: calc(100vh - 2rem); max-height: calc(100dvh - 2rem); }
.modal .modal-body { min-height: 0; overflow-y: auto; }
.modal .btn:not(.btn-icon):not(.btn-close),
.swal2-actions button {
    height: auto !important;
    min-height: 48px;
    min-width: 0;
    max-width: 100%;
    padding: .8em 1em !important;
    line-height: 1.4 !important;
    white-space: normal;
    overflow-wrap: anywhere;
}
.bf-modal-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch !important;
    gap: 12px !important;
    margin: 1.5rem 0 0 !important;
}
.bf-modal-actions > div { display: flex; width: auto !important; padding: 0; margin: 0; }
.bf-modal-actions .btn { flex: 1; border-radius: 14px !important; }
@media (max-width: 479.98px) {
    .bf-modal-actions { grid-template-columns: minmax(0, 1fr); }
    .custom-modal .modal-content { border-radius: 24px !important; }
}

/* Software activation belongs with the account controls, without shrinking text. */
.bf-activation-status[hidden],
.bf-activation-status [hidden] { display: none !important; }
.bf-activation-status { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; flex-shrink: 0; }
.bf-activation-desktop { margin-right: 16px; }
.bf-activation-desktop .bf-activation-copy { flex-direction: row; align-items: baseline; gap: 5px; white-space: nowrap; }
.bf-activation-copy { display: flex; flex-direction: column; line-height: 1.35; }
.bf-activation-label { font-size: .75rem; color: #586764; }
.bf-activation-value { font-size: .875rem; font-weight: 700; }
.bf-activation-status.is-activated .bf-activation-value { color: #08734f; }
.bf-activation-status.is-not-activated .bf-activation-value { color: #b42318; }
.bf-activation-link {
    border: 0; padding: 2px 0; background: transparent; color: #086b55;
    font: inherit; font-size: .8125rem; font-weight: 600; line-height: 1.4;
    text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.bf-activation-link:hover { color: #064d3e; }
.bf-activation-link:focus-visible { outline: 2px solid #08734f; outline-offset: 3px; border-radius: 2px; }
.bf-dashboard-shell .profile_avatar { flex-shrink: 0; }
@media (max-width: 991.98px) {
    .bf-activation-mobile {
        flex-direction: row; align-items: center; justify-content: flex-end; flex-wrap: wrap;
        gap: 4px 12px; margin-top: 6px; min-height: 36px;
    }
    .bf-activation-mobile .bf-activation-copy { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px; }
    .bf-activation-mobile .bf-activation-label { font-size: 12px; }
    .bf-activation-mobile .bf-activation-value { font-size: 13px; }
    .bf-activation-mobile .bf-activation-link { min-height: 36px; font-size: 13px; }
    .bf-dashboard-shell.bf-has-activation-status { padding-top: calc(var(--bf-mobile-header-height, 112px) + 12px); }
}
/* Account status needs room alongside the enlarged desktop navigation. */
@media (min-width: 1400px) and (max-width: 1699.98px) {
    .bf-dashboard-shell { --bs-app-header-height: 120px; --bs-app-header-height-actual: 120px; }
    .bf-dashboard-shell #kt_app_header_container { display: grid !important; grid-template-columns: auto minmax(0,1fr); grid-template-rows: 60px 60px; align-items: center !important; }
    .bf-dashboard-shell #kt_app_header_wrapper { display: contents !important; }
    .bf-dashboard-shell #kt_app_header_container > a { grid-column: 1; grid-row: 1; }
    .bf-dashboard-shell #kt_app_header_wrapper > .app-navbar { grid-column: 2; grid-row: 1; justify-self: end; }
    .bf-dashboard-shell #kt_app_header_wrapper > .app-header-menu { grid-column: 1 / -1; grid-row: 2; width: 100%; }
    .bf-dashboard-shell #kt_app_header_menu { justify-content: center; width: 100%; }
}

/* The active status is a keyboard-accessible entry to licence details. */
button.bf-activation-copy { border: 0; padding: 0; background: transparent; font: inherit; text-align: left; line-height: 1.35; }
button.bf-activation-copy:disabled { opacity: 1; cursor: default; }
button.bf-activation-copy:not(:disabled) { cursor: pointer; }
button.bf-activation-copy:not(:disabled) .bf-activation-value { text-decoration: underline; text-underline-offset: 3px; }
button.bf-activation-copy:focus-visible { outline: 2px solid #08734f; outline-offset: 4px; border-radius: 3px; }
#license_details_modal .bf-license-dialog {
    width: calc(100% - 2rem);
    max-width: 560px;
    margin: 1rem auto;
    height: calc(100% - 2rem);
    min-height: calc(100% - 2rem);
}
#license_details_modal .modal-content { min-height: 0; max-height: 100%; }
.bf-license-status { display: inline-block; padding: 5px 12px; border-radius: 20px; background: #eaf7f0; color: #08734f; font-weight: 700; }
.bf-license-status.is-not-activated { background: #fff0ee; color: #b42318; }
.bf-license-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 14px 20px; margin: 24px 0; }
.bf-license-fields dt { color: #586764; font-weight: 500; }
.bf-license-fields dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; white-space: pre-wrap; }
#license_details_modal .bf-license-change { color: white; background: #08734f; }
#license_details_modal .bf-license-change:hover { background: #065b3f; }
#license_details_modal [hidden], #license_change_notice[hidden] { display: none !important; }
.bf-license-change-notice { padding: 12px 16px; border-radius: 12px; color: #664d03; background: #fff5d6; line-height: 1.5; }
@media (max-width: 479.98px) {
    .bf-license-fields { grid-template-columns: minmax(0, 1fr); gap: 4px; }
    .bf-license-fields dd { margin-bottom: 12px; }
    #license_details_modal .modal-footer { flex-wrap: wrap; }
    #license_details_modal .modal-footer .btn { flex: 1 1 auto; }
}
