/* Чат «клиент ↔ владелец анкеты» — модалка на странице анкеты */

.oc-owner-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 18px;
    margin-top: 8px;
    border: none;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, #F6055B 0%, #8B5CF6 100%);
    box-shadow: 0 6px 18px rgba(246, 5, 91, 0.28);
    transition: transform .15s ease, box-shadow .15s ease;
}
.oc-owner-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(246, 5, 91, .36); }
.oc-owner-btn svg { width: 18px; height: 18px; }

.oc-modal-bg {
    position: fixed; inset: 0; z-index: 10000;
    background: rgba(17, 12, 34, .45); backdrop-filter: blur(3px);
    opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s ease;
    display: flex; align-items: flex-end; justify-content: flex-end; padding: 24px;
}
.oc-modal-bg.open { opacity: 1; visibility: visible; }

.oc-window {
    width: 400px; max-width: 100%; height: 600px; max-height: calc(100vh - 48px);
    background: #fff; border-radius: 22px; box-shadow: 0 24px 60px rgba(17, 12, 34, .28);
    display: flex; flex-direction: column; overflow: hidden;
    transform: translateY(24px) scale(.98); transition: transform .28s cubic-bezier(.16,1,.3,1);
    font-family: inherit;
}
.oc-modal-bg.open .oc-window { transform: translateY(0) scale(1); }

.oc-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 18px; background: linear-gradient(135deg, #F6055B 0%, #8B5CF6 100%); color: #fff; flex-shrink: 0;
}
.oc-header-info { display: flex; align-items: center; gap: 12px; min-width: 0; }
.oc-header-avatar {
    width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
    background: rgba(255,255,255,.22); display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 700; border: 2px solid rgba(255,255,255,.4);
}
.oc-header-name { font-size: 16px; font-weight: 700; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.oc-header-sub { font-size: 12px; opacity: .85; margin-top: 2px; }
.oc-close {
    background: rgba(255,255,255,.16); border: none; color: #fff; width: 34px; height: 34px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0;
}
.oc-close:hover { background: rgba(255,255,255,.28); }
.oc-close svg { width: 20px; height: 20px; }

.oc-body { flex: 1; overflow-y: auto; padding: 18px 16px; background: #f7f7fb; display: flex; flex-direction: column; gap: 8px; }
.oc-body::-webkit-scrollbar { width: 6px; }
.oc-body::-webkit-scrollbar-thumb { background: rgba(139,92,246,.25); border-radius: 6px; }

.oc-empty { margin: auto; text-align: center; color: #8a86a0; padding: 20px; }
.oc-empty-icon {
    width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, rgba(246,5,91,.1) 0%, rgba(139,92,246,.1) 100%); color: #8B5CF6;
}
.oc-empty-icon svg { width: 40px; height: 40px; }
.oc-empty-title { font-size: 16px; font-weight: 700; color: #3a3552; margin-bottom: 6px; }
.oc-empty-text { font-size: 13px; line-height: 1.5; max-width: 260px; margin: 0 auto; }

.oc-msg { display: flex; max-width: 82%; }
.oc-msg--sent { align-self: flex-end; justify-content: flex-end; }
.oc-msg--received { align-self: flex-start; }
.oc-msg-bubble { position: relative; padding: 9px 13px 7px; border-radius: 18px; font-size: 14.5px; line-height: 1.4; word-break: break-word; }
.oc-msg--sent .oc-msg-bubble { background: linear-gradient(135deg, #F6055B 0%, #8B5CF6 100%); color: #fff; border-bottom-right-radius: 5px; }
.oc-msg--received .oc-msg-bubble { background: #fff; color: #241f36; border-bottom-left-radius: 5px; box-shadow: 0 1px 4px rgba(17,12,34,.06); }
.oc-msg-time { display: inline-block; font-size: 10.5px; opacity: .7; margin-left: 8px; white-space: nowrap; }
.oc-msg--received .oc-msg-time { color: #9a95ad; }
.oc-tick { font-size: 11px; letter-spacing: -2px; opacity: .75; }
.oc-tick--read { color: #4ade80; opacity: 1; }

.oc-load-more {
    align-self: center; margin-bottom: 4px; padding: 7px 16px; border: 1px solid #e0dcf0;
    background: #fff; color: #8B5CF6; border-radius: 16px; font-size: 13px; cursor: pointer;
}
.oc-load-more:hover { background: #f4f2fb; }

.oc-blocked { padding: 10px 16px; background: #fff4f4; color: #d64545; font-size: 13px; text-align: center; border-top: 1px solid #f6d5d5; }
.oc-error { padding: 9px 16px; background: #fff8e6; color: #b7791f; font-size: 13px; text-align: center; border-top: 1px solid #f3e0b3; }

.oc-input-area { display: flex; align-items: flex-end; gap: 8px; padding: 12px 14px; background: #fff; border-top: 1px solid #ececf3; flex-shrink: 0; }
.oc-input {
    flex: 1; border: 1px solid #e6e4ef; background: #f7f7fb; border-radius: 20px; padding: 10px 16px;
    font-size: 14.5px; font-family: inherit; resize: none; outline: none; max-height: 110px; line-height: 1.4;
}
.oc-input:focus { border-color: #8B5CF6; background: #fff; }
.oc-send {
    width: 42px; height: 42px; flex-shrink: 0; border: none; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; cursor: pointer; color: #fff;
    background: linear-gradient(135deg, #F6055B 0%, #8B5CF6 100%); box-shadow: 0 4px 12px rgba(246,5,91,.3);
}
.oc-send:hover { transform: scale(1.06); }
.oc-send svg { width: 19px; height: 19px; }

@media (max-width: 600px) {
    .oc-modal-bg { padding: 0; }
    .oc-window { width: 100%; height: 100%; max-height: 100%; border-radius: 0; }
}
