/* Prosty edytor opisu terenu (tereny/js/prosty_edytor.js) — kolory KSSSE */
.tp-edytor {
    position: relative;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.tp-edytor:focus-within {
    border-color: #8B1538;
    box-shadow: 0 0 0 3px rgba(139, 21, 56, 0.12);
}

.tp-edytor__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
    padding: 6px;
    border-bottom: 1px solid #e5e7eb;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.tp-edytor__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: #4b5563;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.tp-edytor__btn:hover {
    background: #fff;
    border-color: #e5e7eb;
    color: #1a1a1a;
}

.tp-edytor__btn:focus-visible {
    outline: 2px solid #8B1538;
    outline-offset: 1px;
}

.tp-edytor__btn.is-active {
    background: rgba(139, 21, 56, 0.1);
    border-color: transparent;
    color: #8B1538;
}

.tp-edytor__sep {
    width: 1px;
    height: 20px;
    margin: 0 6px;
    background: #d1d5db;
}

.tp-edytor__tresc {
    min-height: 220px;
    max-height: 600px;
    overflow-y: auto;
    padding: 14px 16px;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #1a1a1a;
    outline: none;
    overflow-wrap: anywhere;
}

.tp-edytor__tresc p,
.tp-edytor__tresc div {
    margin: 0 0 10px;
}

.tp-edytor__tresc h3 {
    margin: 16px 0 8px;
    font-size: 1.1rem;
    font-weight: 700;
}

.tp-edytor__tresc b,
.tp-edytor__tresc strong {
    font-weight: 700;
}

.tp-edytor__tresc i,
.tp-edytor__tresc em {
    font-style: italic;
}

.tp-edytor__tresc ul,
.tp-edytor__tresc ol {
    margin: 0 0 10px;
    padding-left: 24px;
}

.tp-edytor__tresc ul { list-style: disc; }
.tp-edytor__tresc ol { list-style: decimal; }

.tp-edytor--pusty .tp-edytor__tresc::before {
    content: attr(data-placeholder);
    position: absolute;
    color: #9ca3af;
    pointer-events: none;
}

@media (max-width: 640px) {
    .tp-edytor__btn {
        width: 38px;
        height: 38px;
    }

    .tp-edytor__sep {
        margin: 0 2px;
    }
}
