#pdn-echo-banner,
#pdn-echo-modal {
    position: fixed;
    z-index: 99999;
    font: 13px/1.4 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial;
}

/* fix: компактное позиционирование для стандартного режима */
#pdn-echo-banner:has(.pdn-echo-content) {
    bottom: 10px;
}

/* fix: позиционирование в зависимости от выбранной позиции */
#pdn-echo-banner:has(.pdn-echo-content)[data-align="left"] {
    left: 10px;
    right: auto;
    transform: none;
}

#pdn-echo-banner:has(.pdn-echo-content)[data-align="center"] {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
}

#pdn-echo-banner:has(.pdn-echo-content)[data-align="right"] {
    left: auto;
    right: 10px;
    transform: none;
}


@media (max-width: 575.98px) {
    #pdn-echo-banner:has(.pdn-echo-content) {
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
    }
}

/* расширенный режим - угловая позиция как было */
#pdn-echo-banner:has(.pdn-echo-row) {
    inset: auto 10px 10px auto;
}

#pdn-echo-banner[hidden],
#pdn-echo-modal[hidden] {
    display: none;
}

.pdn-echo-wrap {
    background: #0f172a;
    color: #e2e8f0;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, .25);
    max-width: 700px;
}

/* fix: компактный стиль для стандартного режима */
.pdn-echo-wrap:has(.pdn-echo-content) {
    padding: 12px 16px;
    border-radius: 10px;
    max-width: 300px;
    width: calc(100vw - 20px);
}

/* расширенный режим - стили как было */
.pdn-echo-wrap:has(.pdn-echo-row) {
    padding: 16px;
    border-radius: 10px;
}

.pdn-echo-row {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.pdn-echo-title {
    font-weight: 600;
    font-size: 16px;
}

.pdn-echo-desc {
    opacity: .9;
}

.pdn-echo-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pdn-echo-content .pdn-echo-desc {
    font-size: 13px;
    line-height: 1.4;
    opacity: .95;
}

.pdn-echo-content .pdn-echo-desc a {
    color: inherit;
    text-decoration: underline;
}

.pdn-echo-btn-full {
    width: 100%;
    padding: 10px;
    font-size: 15px;
    font-weight: 500;
}

.pdn-echo-actions {
    margin-left: auto;
    display: flex;
    gap: 8px;
}

.pdn-echo-btn {
    background: #1e293b;
    border: 1px solid #334155;
    color: #e2e8f0;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
}

.pdn-echo-btn:hover,
.pdn-echo-btn:focus,
.pdn-echo-btn:active {
    background: #0f141d;
    border: 1px solid #334155;
    color: #e2e8f0;
    outline: none;
}

.pdn-echo-btn.primary {
    background: #22c55e;
    border-color: #16a34a;
    color: #08210d;
}

.pdn-echo-btn.link {
    background: transparent;
    border: none;
    text-decoration: underline;
}

.pdn-echo-change {
    display: block;
    text-align: center;
    opacity: .7;
    font-size: 12px;
    margin: 8px 0;
}

/* Модалка настроек (простая) */
.pdn-echo-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pdn-echo-modal {
    background: #fff;
    color: #0f172a;
    border-radius: 12px;
    padding: 20px;
    width: min(560px, 94vw);
    box-shadow: 0 10px 40px rgba(0, 0, 0, .35);
}

.pdn-echo-modal h3 {
    margin-top: 0;
}

.pdn-echo-list {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
}

.pdn-echo-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e5e7eb;
}

.pdn-consent-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin: 12px 0 18px;
    width: 100%;
    flex: 0 0 100%;
}

.pdn-consent-row input[type="checkbox"] {
    margin: 0;
    vertical-align: baseline;
    position: relative;
    top: .1em;
}

.pdn-consent-row .pol {
    margin: 0;
    line-height: 1.3;
    display: flex;
}

.pdn-consent-row input[type="checkbox"] {
    -webkit-appearance: auto;
    appearance: auto;
    display: inline-block;
    width: 16px;
    height: 16px;
    min-width: 16px;
    min-height: 16px;
    box-sizing: content-box;
    transform: none;
}

/*ADAPTIVE*/
/* MEDIUM */
@media only screen and (max-width : 768px) {
    #pdn-echo-banner:has(.pdn-echo-row) {
        inset: auto 10px 10px 10px;
    }
}

/* PHONE*/
@media (max-width: 575.98px) {
    #pdn-echo-banner:has(.pdn-echo-row) {
        inset: auto 5px 5px 5px;
    }

    .pdn-echo-wrap:has(.pdn-echo-content) {
        padding: 10px 12px;
    }

    .pdn-echo-title {
        font-size: 14px;
    }

    .pdn-echo-desc {
        font-size: 12px;
        line-height: 1.35;
    }

    .pdn-echo-btn-full {
        padding: 9px;
        font-size: 14px;
    }

    .pdn-consent-row .pol {
        font-size: 14px;
        line-height: 1.35;
    }

    .pdn-echo-btn {
        font-size: 11px;
        padding: 8px;
    }
}