#tcs-chat-container {
    margin: 0px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

#tcs-chat-box {
    border: 1px solid #e0e0e0;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
    background: #fff;
}

#tcs-chat-header {
    background: #383941;
    color: white;
    padding: 12px 15px;
    border-radius: 12px 12px 0 0;
    font-weight: bold;
}

#tcs-chat-header .online-status {
    float: right;
    font-size: 12px;
    font-weight: normal;
}

#tcs-messages {
    padding: 15px;
    min-height: 200px;
    max-height: 350px;
    overflow-y: auto;
    background: #f9f9f9;
}

.tcs-system {
    text-align: center;
    color: #888;
    font-size: 12px;
    padding: 8px;
    background: #eee;
    border-radius: 20px;
    margin-bottom: 10px;
}

/* ===== ПРОСТОЙ ИНПУТ С КНОПКОЙ ВНУТРИ ===== */
#tcs-input-area {
    padding: 10px 15px;
    border-top: 1px solid #e0e0e0;
    background: #fff;
}

#tcs-user-name {
    display: none;
}

/* Контейнер с position relative для кнопки внутри */
.tcs-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 24px;
    padding: 0 10px;
    transition: border-color 0.2s;
}

.tcs-input-wrap:focus-within {
    border-color: #8774E1;
    background: #fff;
}

/* Поле ввода */
#tcs-message-input {
    flex: 1;
    outline: none;
    border: none;
    background: transparent;
    padding: 10px 45px 10px 15px;
    font-size: 14px;
    font-family: inherit;
    min-height: 44px;
    max-height: 120px;
    overflow-y: auto;
    line-height: 1.4;
    color: #212121;
}

/* Плейсхолдер для contenteditable */
#tcs-message-input:empty:before {
    content: "Сообщение";
    color: #999;
    pointer-events: none;
}

#tcs-message-input:focus:empty:before {
    content: "Сообщение";
    color: #999;
}

/* Кнопка отправки внутри инпута */
#tcs-send-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #b0b0b0;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 50%;
    transition: all 0.3s;
    font-size: 20px;
    line-height: 1;
}

/* Кнопка активна когда есть текст */
#tcs-send-btn.active {
    color: #8774E1;
}

#tcs-send-btn.active:hover {
    background: #8774E1;
    color: #fff;
}

#tcs-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== СООБЩЕНИЯ ===== */
.tcs-message-user {
    background: #8d9195;
    color: #fff;
    padding: 10px 15px;
    border-radius: 15px 15px 15px 0;
    margin: 8px 0;
    max-width: 75%;
    font-size: 14px;
	display:flex;
	justify-content: space-between;
}

.tcs-message-user small {
    display: block;
    color: #e0e0e0;
    font-size: 10px;
    margin-top: 4px;
}

.tcs-message-admin {
    background: #e9ecef;
    color: #333;
    padding: 10px 15px;
    border-radius: 15px 15px 0 15px;
    margin: 8px 0 8px auto;
    max-width: 75%;
    font-size: 14px;
	display:flex;
	justify-content: space-between;
}

.tcs-message-admin small {
    display: block;
    color: #666;
    font-size: 10px;
    margin-top: 4px;
}

.tcs-message-user .message-text,
.tcs-message-admin .message-text {
    word-wrap: break-word;
}

/* ===== СТАТУС ===== */
#tcs-status {
    padding: 10px 15px;
    font-size: 14px;
    color: #555;
    border-top: 1px solid #e0e0e0;
    min-height: 40px;
    background: #fff;
}

.tcs-success {
    color: #2d8a4e;
}

.tcs-error {
    color: #d32f2f;
}

/* ===== АНИМАЦИЯ ===== */
.tcs-loading {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

/* ===== АДАПТИВ ===== */
@media (max-width: 480px) {
    #tcs-chat-container {
        margin: 10px;
    }
    
    #tcs-messages {
        max-height: 250px;
    }
    
    #tcs-message-input {
        font-size: 13px;
        padding: 8px 40px 8px 12px;
        min-height: 38px;
    }
    
    #tcs-send-btn {
        font-size: 17px;
        right: 4px;
        padding: 4px 6px;
    }
}
#tcs-message-input .placeholder {
    color: #999;
    pointer-events: none;
}

.tcs-message-notification {
	color:#990000;
	font-weight: 400;
}