/* IW content callouts – blog, CMS, edytor CKEditor */
.iw-callout,
.ck-content .iw-callout {
    margin: 1.25rem 0;
    padding: 1rem 1.25rem;
    border-radius: 6px;
    font-size: 1rem;
    line-height: 1.6;
    border: none;
}

.iw-callout > :first-child,
.iw-callout-title {
    margin-top: 0;
}

.iw-callout > :last-child {
    margin-bottom: 0;
}

.iw-callout p,
.iw-callout-title {
    margin-bottom: 0.5em;
}

.iw-callout p:last-child {
    margin-bottom: 0;
}

.iw-callout strong,
.iw-callout-title strong {
    font-weight: 700;
}

/* Wspólny układ jak panel Info – delikatne tło wg typu, bez lewego paska */
.iw-callout--info,
.iw-callout--success,
.iw-callout--warning,
.iw-callout--error,
.ck-content .iw-callout--info,
.ck-content .iw-callout--success,
.ck-content .iw-callout--warning,
.ck-content .iw-callout--error {
    border-radius: 6px;
    padding: 1rem 1.25rem;
}

.iw-callout--info,
.ck-content .iw-callout--info {
    background: #edf4fc;
}

.iw-callout--success,
.ck-content .iw-callout--success {
    background: #edf7f1;
}

.iw-callout--warning,
.ck-content .iw-callout--warning {
    background: #fff8e6;
}

.iw-callout--error,
.ck-content .iw-callout--error {
    background: #fef2f2;
}

.iw-callout--info .iw-callout-title strong,
.iw-callout--info > p:first-child strong,
.ck-content .iw-callout--info .iw-callout-title strong,
.ck-content .iw-callout--info > p:first-child strong {
    color: #1a5fb4;
}

.iw-callout--success .iw-callout-title strong,
.iw-callout--success > p:first-child strong,
.ck-content .iw-callout--success .iw-callout-title strong,
.ck-content .iw-callout--success > p:first-child strong {
    color: #0d7a4e;
}

.iw-callout--warning .iw-callout-title strong,
.iw-callout--warning > p:first-child strong,
.ck-content .iw-callout--warning .iw-callout-title strong,
.ck-content .iw-callout--warning > p:first-child strong {
    color: #b45309;
}

.iw-callout--error .iw-callout-title strong,
.iw-callout--error > p:first-child strong,
.ck-content .iw-callout--error .iw-callout-title strong,
.ck-content .iw-callout--error > p:first-child strong {
    color: #b91c1c;
}

/* Placeholder w edytorze */
.ck-content blockquote.iw-callout-placeholder,
.iw-callout-placeholder {
    border: none;
    margin: 1.25rem 0;
    padding: 1rem 1.25rem;
    border-radius: 6px;
    font-style: normal;
}

.ck-content blockquote.iw-callout-placeholder .iw-callout-marker,
.iw-callout-placeholder .iw-callout-marker {
    display: none !important;
}

.ck-content blockquote.iw-callout-placeholder .iw-callout-title,
.iw-callout-placeholder .iw-callout-title {
    margin-top: 0;
    margin-bottom: 0.45em;
}

.ck-content blockquote.iw-callout-placeholder--info,
.iw-callout-placeholder--info { background: #edf4fc; }

.ck-content blockquote.iw-callout-placeholder--success,
.iw-callout-placeholder--success { background: #edf7f1; }

.ck-content blockquote.iw-callout-placeholder--warning,
.iw-callout-placeholder--warning { background: #fff8e6; }

.ck-content blockquote.iw-callout-placeholder--error,
.iw-callout-placeholder--error { background: #fef2f2; }

.ck-content blockquote.iw-callout-placeholder--info .iw-callout-title strong,
.iw-callout-placeholder--info .iw-callout-title strong { color: #1a5fb4; }

.ck-content blockquote.iw-callout-placeholder--success .iw-callout-title strong,
.iw-callout-placeholder--success .iw-callout-title strong { color: #0d7a4e; }

.ck-content blockquote.iw-callout-placeholder--warning .iw-callout-title strong,
.iw-callout-placeholder--warning .iw-callout-title strong { color: #b45309; }

.ck-content blockquote.iw-callout-placeholder--error .iw-callout-title strong,
.iw-callout-placeholder--error .iw-callout-title strong { color: #b91c1c; }

/* Przycisk paneli w pasku CKEditor */
.iw-ck-macro {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.iw-ck-macro-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.iw-ck-macro-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    min-width: var(--ck-ui-component-min-height, 2.35em);
    height: var(--ck-ui-component-min-height, 2.35em);
    padding: 0 0.35rem;
    border: 0;
    border-radius: var(--ck-border-radius, 2px);
    background: transparent;
    color: var(--ck-color-text, #475569);
    cursor: pointer;
    flex-shrink: 0;
}

.iw-ck-macro-btn:hover,
.iw-ck-macro-wrap.open .iw-ck-macro-btn {
    background-color: var(--ck-color-button-on-background, #eef1f4);
}

.iw-ck-macro-caret {
    opacity: 0.55;
    flex-shrink: 0;
}

.iw-ck-macro-menu--portal {
    display: none;
    position: fixed;
    z-index: 20000;
    min-width: 9rem;
    margin: 0;
    padding: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    overflow: hidden;
}

.iw-ck-macro-menu--portal.is-open {
    display: block;
}

.iw-ck-macro-menu-item {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0.45rem 0.75rem;
    border: 0;
    border-bottom: 1px solid #f1f5f9;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.4;
    text-align: left;
    cursor: pointer;
}

.iw-ck-macro-menu-item:last-child {
    border-bottom: 0;
}

.iw-ck-macro-menu-item:hover {
    background: #f8fafc;
}

.iw-ck-macro-menu-item--info { color: #1a5fb4; }
.iw-ck-macro-menu-item--success { color: #0d7a4e; }
.iw-ck-macro-menu-item--warning { color: #b45309; }
.iw-ck-macro-menu-item--error { color: #b91c1c; }

body.iw-admin .ck.ck-editor__main > .ck-editor__editable {
    min-height: 280px;
}

body.iw-admin .ck.ck-toolbar {
    flex-wrap: wrap;
}
