.stro-msg-nav {
    display: flex;
    align-items: center;
}

.stro-msg-nav svg {
    width: 24px;
    height: 24px;
    display: block
}

.stro-msg-nav [data-stro-unread] {
    background: #FF5252;
    color: #fff;
    margin-left: 10px;
    text-align: center;
    font-weight: 700 !important;
    border-radius: 999px;
    display: inline-flex;
    padding: 2px 7px;
    align-items: center;
    justify-content: center;
    align-content: center;
    font-size: 11px;
    position: relative;
    top: -1px;
}

.stro-msg-compose {
    width: min(520px, 100%);
    box-sizing: border-box
}

.stro-msg-compose label, .stro-msg-reply label {
    display: block;
    margin: 20px 0 12px 0;
    font-weight: 700;
    font-size: 13px;

}

.stro-msg-compose input, .stro-msg-compose textarea, .stro-msg-reply textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font: inherit;
    background: #fff;
    color: #333;
    margin-top: 6px;
    margin-bottom: 1px;
    line-height: 155%;
    font-weight: 500 !important;
    font-size: 17px !important;
}

.stro-msg-compose textarea, .stro-msg-reply textarea {
    resize: vertical
}

.stro-msg-hint {
    font-size: 15px;
    color: #666
}

.stro-msg-trap {
    position: absolute !important;
    left: -10000px !important;
    width: 1px;
    height: 1px;
    overflow: hidden
}

.stro-msg-compose [hidden] {
    display: none !important
}

.stro-msg-app {
    padding-left: 7%;
    padding-right: 7%;
    box-sizing: border-box;
    max-width: 1640px;
    margin: 0 auto;
    box-sizing: border-box;

}


.stro-msg-app button {
    cursor: pointer;
    font: inherit
}

.stro-msg-app button:disabled, .stro-msg-compose button:disabled {
    opacity: .6;
    cursor: wait;
    float: left;
    margin-right: 20px;
}

.stro-msg-tabs {
    display: flex;
    gap: 8px;
    margin: 20px 0;
    padding-left: 0;
}

.stro-msg-tabs button {
    padding: 10px 18px;
    border: 0;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 700;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: #fff;
    border-radius: 999px;
    color: #454d51;
}

.stro-msg-tabs .is-active, .stro-msg-tabs button:hover {

    color: #e17c30
}

.stro-msg-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    border: 1px solid #ddd;
    border-radius: 7px;
    background: #fff;
    min-height: 420px;
    overflow: hidden;
    box-shadow: 0px 1px 5px 0px rgba(0, 0, 0, 0.13);
    font-size: 16px;
}

.stro-msg-list {
    border-right: 1px solid #ddd;
    padding: 23px;
    max-height: 680px;
    overflow: auto
}

.stro-msg-list-item {
    display: flex;
    flex-direction: column;
    text-align: left;
    position: relative;
    width: 100%;
    padding: 14px 36px 14px 16px;
    margin-bottom: 6px;
    border: 0;
    border-radius: 6px;
    background: #f7f6f3;
    color: #333;
    gap: 8px;
    overflow-wrap: anywhere;
    font-size: 14px !important;
}

.stro-msg-list-item.is-unread {
    background: #fff0e4;
    box-shadow: inset 3px 0 #FF5252
}

[data-stro-status] {
    padding: 10px 14px;
    margin: 12px 0;
    background: #fff;
    color: #454d51;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
}

#author-message-modal [data-stro-status] {
    background: #edf5d2;


}

.stro-msg-blocked-notice {
    font-size: 16px;
    position: relative;
    top: 10px;
}

/* Скрива празния елемент, за да няма фон и отстояния */
[data-stro-status]:empty {
    display: none;
}

/* Съобщенията за грешка получават този клас от JS */
[data-stro-status].is-error {
    background: #fff0f0;
    color: #b52c25;
}

.stro-msg-list-item small {
    color: #7a8489;
    font-size: 12px;
    position: relative;
    top: -2px;
}

.stro-msg-badge {
    position: absolute;
    right: 8px;
    top: 12px;
    background: #FF5252;
    color: #fff;
    margin-left: 10px;
    text-align: center;
    font-weight: 700 !important;
    border-radius: 999px;
    display: inline-flex;
    padding: 2px 7px;
    font-size: 12px;
}

.stro-msg-thread {
    padding: 20px;
    min-width: 0
}

.stro-msg-thread p.choose-conversation {
    background: url(/wp-content/themes/stroytel/assets/img/conversation.svg) no-repeat center;
    background-position-y: center;
    background-size: auto;
    background-size: 160px;
    display: flex;
    height: 100%;
    align-items: center;
    justify-content: center;
    align-content: center;
    background-position-y: 20px;
    margin-top: 7%;
}

.stro-msg-thread-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    font-weight: bold;
}

.stro-msg-thread-head h2 {
    font-size: 1.2em;
    margin: 0
}

.stro-msg-actions {
    margin-left: auto;
    position: relative;
    flex-shrink: 0;
    z-index: 5;
    font-weight: normal;
}

.stro-msg-actions summary {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    list-style: none;
    padding: 4px 0;
    font-size: 14px;
    color: #7a8489;
    border: 0;
    background: transparent;
}

.stro-msg-actions summary::-webkit-details-marker {
    display: none;
}

.stro-msg-actions summary::before {
    content: '▾';
    font-size: 12px;
}

.stro-msg-actions[open] summary {
    color: #e17c30;
}

.stro-msg-actions-menu {
    display: none;
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    width: max-content;
    min-width: 190px;
    max-width: calc(100vw - 40px);
    padding: 0;
    background: #fff6ed;
    border: 1px solid #ffc6a2;
    border-radius: 6px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, .16);
    overflow: hidden;
}

.stro-msg-actions[open] .stro-msg-actions-menu {
    display: block;
}

.stro-msg-actions .stro-msg-actions-menu button {
    display: block;
    width: 100%;
    margin: 0;
    padding: 13px 18px;
    text-align: left;
    font-size: 14px;
    line-height: 1.4;
    color: #ed761f;
    background: transparent;
    border: 0;
    border-radius: 0;
    white-space: normal;
    font-weight: 700;
}

.stro-msg-actions .stro-msg-actions-menu button+button {
    border-top: 1px solid #ffc6a2;
}

.stro-msg-actions .stro-msg-actions-menu button:hover,
.stro-msg-actions .stro-msg-actions-menu button:focus-visible {
    color: #ed761f;
    background: #ffe7d3;
    outline: 0;
}

.stro-msg-actions summary:focus-visible {
    outline: 2px solid #e17c30;
    outline-offset: 2px;
}

.stro-msg-correspondent {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    flex-wrap: wrap;
}

.stro-msg-person-label {
    color: #7a8489;
    font-weight: normal;
}

.stro-msg-history {
    max-height: 440px;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;

}

.page article.stro-msg-message {
    background: #f3f2ef;
    padding: 12px 16px;
    margin: 0;
    border-radius: 7px;
    width: 85%;
    box-sizing: border-box;
    align-self: flex-start;
    overflow-wrap: anywhere
}

.page article.stro-msg-message.is-mine {
    background: #fff0e4;
    align-self: flex-end
}

.stro-msg-message-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 12px;
    color: #7a8489;
    flex-wrap: wrap
}

.stro-msg-thread time {
    font-size: 12px;
    color: #7a8489;
    display: block;

}

.stro-msg-thread .stro-msg-announcement-body {
    padding: 15px 0 20px 0;
}

.stro-msg-message-meta a {
    font-weight: 700;
}

.stro-msg-message p, .stro-msg-announcement-body {
    white-space: pre-wrap;
    overflow-wrap: anywhere
}

.stro-msg-message p {
    margin: 8px 0 0
}

.stro-msg-back {
    display: none
}

.stro-msg-app .is-error, .stro-msg-compose .is-error {
    color: #b52c25
}

.stro-msg-older, .stro-msg-more-list {
    padding: 10px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 5px
}

@media(max-width:860px) {
    .dashboard-right-content .stro-msg-nav [data-stro-unread] { 
        margin-left: 0;
        margin-top: 5px;
    }
    .stro-msg-layout { 
        border-radius: 0;
    }
    .stro-msg-list {
        padding: 18px;
    }
    .stro-msg-app button:disabled, .stro-msg-compose button:disabled {
        float: none;
    }

    .stro-msg-blocked-notice {
        padding-bottom: 20px;
        padding-top: 5px;
    }

    .stro-msg-layout {
        display: block
    }

    .stro-msg-list {
        border-right: 0;
        max-height: none
    }

    .stro-msg-thread {
        display: none;
        padding: 18px
    }
    .stro-msg-tabs {
        padding:0 18px;
        margin: 18px 0;
    }

    .stro-msg-app.has-thread .stro-msg-thread {
        display: block
    }

    .stro-msg-app.has-thread .stro-msg-list {
        display: none
    }

    .stro-msg-back {
        display: inline-block;
        border: 0;
        background: transparent;
        padding: 6px;
        width: 100%;
        text-align: left;
        border-bottom: rgba(0, 0, 0, 0.1) 1px solid;
        font-size: 13px !important;
        padding-bottom: 15px;
        color: #7a8489;
    }

    .stro-msg-message {
        width: 92%
    }

    .stro-msg-thread-head {
        flex-wrap: wrap
    }

    .stro-msg-history {
        max-height: 55vh
    }

    .stro-msg-app {
        padding: 0
    }
}

/* A zero count has no painted background or padding, including before JS loads. */
.stro-msg-nav [data-stro-unread]:empty,
.stro-msg-nav [data-stro-unread][hidden] {
    display: none !important;
}

.stro-msg-compose textarea, .stro-msg-reply textarea {
    overflow-y: hidden;
    resize: none;
    max-height: none;
}