/**
 * CSS липкой панели и формы
 */

.wca-sticky-bar {
    position: fixed;
    top: 32px;
    left: 0;
    right: 0;
    z-index: 99999;
    height: 46px;
    background: #000;
    border-bottom: 4px solid #ddd;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .1);
}

.wca-sticky-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1200px, 100%);
    height: 100%;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.wca-sticky-left a {
    color: #0073aa;
    text-decoration: none;
    font-weight: 600;
}

.wca-sticky-center {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wca-sticky-count-label {
    color: #aaa;
    font-size: 14px;
}

.wca-sticky-count {
    color: #0073aa;
    font-size: 16px;
    font-weight: 700;
}

.wca-sticky-right {
    position: relative;
}

.wca-sticky-account-btn {
    padding: 8px 16px;
    border: 0;
    border-radius: 4px;
    background: #0073aa;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
}

.wca-sticky-account-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 100000;
    min-width: 190px;
    margin-top: 8px;
    overflow: hidden;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
}

.wca-sticky-account-menu.is-open {
    display: block;
}

.wca-sticky-account-link {
    display: block;
    padding: 10px 16px;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
    text-decoration: none;
    font-size: 14px;
}

.wca-sticky-account-link:last-child {
    border-bottom: 0;
}

.wca-sticky-account-link:hover {
    background: #f9f9f9;
}

.wca-registration-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100001;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, .65);
    box-sizing: border-box;
}

.wca-registration-modal.is-open {
    display: flex;
}

.wca-registration-modal-content {
    position: relative;
    width: min(440px, 100%);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 30px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .3);
    box-sizing: border-box;
}

.wca-registration-modal-content h2 {
    margin: 0 0 22px;
    color: #222;
    text-align: center;
}

.wca-registration-modal-close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #666;
    cursor: pointer;
    font-size: 28px;
    line-height: 32px;
}

.wca-registration-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.wca-reg-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wca-reg-field label {
    color: #333;
    font-size: 14px;
    font-weight: 600;
}

.wca-reg-field input,
.wca-reg-field select {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    box-sizing: border-box;
    color: #333;
    font-size: 15px;
}

.wca-reg-submit {
    width: 100%;
    min-height: 44px;
    padding: 11px 16px;
    border: 0;
    border-radius: 4px;
    background: #0073aa;
    color: #fff;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
}

.wca-reg-submit:disabled {
    opacity: .65;
    cursor: wait;
}

.wca-registration-message {
    display: none;
    padding: 10px 12px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
}

.wca-registration-message.is-success,
.wca-registration-message.is-error {
    display: block;
}

.wca-registration-message.is-success {
    background: #eaf7ed;
    color: #176b2c;
}

.wca-registration-message.is-error {
    background: #fdecec;
    color: #a12622;
}

.wca-registration-honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
}

body.wca-registration-modal-open {
    overflow: hidden;
}

@media screen and (max-width: 782px) {
    .wca-sticky-bar {
        top: 46px;
    }

    .wca-sticky-center {
        display: none;
    }

    .wca-sticky-inner {
        padding: 0 12px;
    }

    .wca-registration-modal-content {
        padding: 25px 20px;
    }
}

/*feedback*/
/*пользовательская часть*/
.wca-user-feedback {
    margin-top: 30px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
}

.wca-user-feedback-messages {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 150px;
    max-height: 450px;
    margin-bottom: 15px;
    overflow-y: auto;
}

.wca-feedback-message {
    max-width: 75%;
    padding: 10px 13px;
    border-radius: 8px;
    background: #f1f1f1;
}

.wca-feedback-message.is-own {
    align-self: flex-end;
    background: #dff1ff;
}

.wca-feedback-message.is-admin {
    align-self: flex-start;
    background: #f1f1f1;
}

.wca-feedback-message-author {
    margin-bottom: 5px;
    font-size: 12px;
    font-weight: 600;
}

.wca-feedback-message-text {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.wca-feedback-message-date {
    margin-top: 5px;
    color: #888;
    font-size: 11px;
    text-align: right;
}

.wca-user-feedback-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wca-user-feedback-form textarea {
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
    resize: vertical;
}

.wca-user-feedback-form button {
    align-self: flex-start;
    padding: 10px 18px;
    border: 0;
    border-radius: 4px;
    background: #0073aa;
    color: #fff;
    cursor: pointer;
}

.wca-user-feedback-notice {
    font-size: 14px;
}

.wca-user-feedback-notice.is-success {
    color: #176b2c;
}

.wca-user-feedback-notice.is-error {
    color: #b32d2e;
}

/*админская часть*/
.wca-feedback-admin-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
    margin-top: 20px;
}

.wca-feedback-admin-users,
.wca-feedback-admin-chat {
    padding: 20px;
    border: 1px solid #ccd0d4;
    background: #fff;
}

.wca-feedback-admin-users h2,
.wca-feedback-admin-chat h2 {
    margin-top: 0;
}

.wca-admin-feedback-user {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 6px;
    padding: 10px;
    border: 1px solid #ccd0d4;
    background: #fff;
    cursor: pointer;
    text-align: left;
}

.wca-admin-feedback-user:hover,
.wca-admin-feedback-user.is-active {
    border-color: #2271b1;
    background: #f0f6fc;
}

.wca-admin-feedback-user b {
    min-width: 22px;
    border-radius: 12px;
    background: #d63638;
    color: #fff;
    text-align: center;
}

#wca-feedback-admin-messages {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 350px;
    max-height: 550px;
    margin-bottom: 20px;
    padding: 15px;
    overflow-y: auto;
    background: #f6f7f7;
}

.wca-admin-feedback-message {
    max-width: 75%;
    padding: 10px;
    border-radius: 6px;
    background: #fff;
}

.wca-admin-feedback-message.is-own {
    align-self: flex-end;
    background: #dff1ff;
}

.wca-admin-feedback-message.is-user {
    align-self: flex-start;
}

.wca-admin-feedback-message small {
    display: block;
    margin-top: 5px;
    color: #777;
}

#wca-feedback-admin-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#wca-feedback-admin-form textarea {
    width: 100%;
    box-sizing: border-box;
}

#wca-feedback-admin-notice.is-success {
    color: #176b2c;
}

#wca-feedback-admin-notice.is-error {
    color: #b32d2e;
}

@media screen and (max-width: 800px) {
    .wca-feedback-admin-layout {
        display: block;
    }

    .wca-feedback-admin-users {
        margin-bottom: 20px;
    }
}