/* Medibox v370 — PZU / clinic logo 200 × 150
   The uploaded image is never stretched: object-fit: contain. */

body.app-body #clinicSettingsDialog .report-logo-preview-card {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 20px;
    align-items: center;
}

body.app-body #clinicSettingsDialog .report-logo-preview {
    width: 200px !important;
    height: 150px !important;
    min-width: 200px;
    min-height: 150px !important;
    max-width: 200px;
    max-height: 150px;
    padding: 0 !important;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid #dce3ef;
    border-radius: 14px;
    background:
        linear-gradient(45deg, #f7f9fc 25%, transparent 25%),
        linear-gradient(-45deg, #f7f9fc 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #f7f9fc 75%),
        linear-gradient(-45deg, transparent 75%, #f7f9fc 75%),
        #fff;
    background-size: 18px 18px;
    background-position: 0 0, 0 9px, 9px -9px, -9px 0;
    box-shadow: 0 6px 18px rgba(23,38,59,.06);
}

body.app-body #clinicSettingsDialog .report-logo-preview img {
    display: block !important;
    width: 200px !important;
    height: 150px !important;
    max-width: 200px !important;
    max-height: 150px !important;
    object-fit: contain !important;
    object-position: center center;
    background: transparent;
}

body.app-body #clinicSettingsDialog .report-logo-preview-copy {
    align-self: center;
}

body.app-body #clinicSettingsDialog .report-logo-preview-copy strong {
    font-size: 15px;
}

body.app-body #clinicSettingsDialog .report-logo-preview-copy span {
    max-width: 520px;
}

/* Older logo-setting component, if it is rendered by another settings flow. */
body.app-body .clinic-logo-preview {
    width: 200px !important;
    height: 150px !important;
    flex: 0 0 200px !important;
    border-radius: 14px !important;
}

body.app-body .clinic-logo-preview img {
    width: 200px !important;
    height: 150px !important;
    max-width: 200px !important;
    max-height: 150px !important;
    object-fit: contain !important;
}

/* 200x150 still fits standard phones; on very narrow screens scale the
   visual container proportionally while preserving the 4:3 ratio. */
@media (max-width: 520px) {
    body.app-body #clinicSettingsDialog .report-logo-preview-card {
        grid-template-columns: 1fr !important;
        justify-items: center;
        gap: 13px;
        padding: 14px !important;
    }

    body.app-body #clinicSettingsDialog .report-logo-preview {
        width: min(200px, 100%) !important;
        aspect-ratio: 4 / 3;
        height: auto !important;
        min-width: 0;
        min-height: 0 !important;
    }

    body.app-body #clinicSettingsDialog .report-logo-preview img {
        width: 100% !important;
        height: 100% !important;
    }

    body.app-body #clinicSettingsDialog .report-logo-preview-copy {
        width: 100%;
        text-align: center;
    }

    body.app-body .clinic-logo-preview {
        width: min(200px, 100%) !important;
        height: auto !important;
        aspect-ratio: 4 / 3;
        flex-basis: auto !important;
    }

    body.app-body .clinic-logo-preview img {
        width: 100% !important;
        height: 100% !important;
    }
}
