/* Основной контейнер виджета */
.oct-chat-widget {
    position: fixed;
    bottom: 20px;
    z-index: 10000;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.oct-chat-widget.oct-position-left {
    left: 20px;
}

.oct-chat-widget.oct-position-right {
    right: 20px;
}

/* Кнопка открытия чата */
.oct-chat-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--oct-primary-color, #007cba);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    position: relative;
}

.oct-chat-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.oct-chat-button svg {
    width: 24px;
    height: 24px;
    fill: white;
}

.oct-chat-button .oct-close-icon {
    display: none;
}

.oct-chat-button.active .oct-chat-icon {
    display: none;
}

.oct-chat-button.active .oct-close-icon {
    display: block;
}

/* Окно чата */
.oct-chat-window {
    position: absolute;
    bottom: 70px;
    width: 350px;
    height: 550px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    flex-direction: column;
    overflow: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}

.oct-chat-window.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.oct-position-left .oct-chat-window {
    left: 0;
}

.oct-position-right .oct-chat-window {
    right: 0;
}

/* Заголовок чата */
.oct-chat-header {
    background: var(--oct-primary-color, #007cba);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.oct-chat-title {
    font-weight: 600;
    font-size: 16px;
}

.oct-chat-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 18px;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Область сообщений */
.oct-chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8f9fa;
}

.oct-welcome-message {
    background: white;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-size: 14px;
    line-height: 1.4;
}

.oct-user-message {
    background: var(--oct-primary-color, #007cba);
    color: white;
    padding: 10px 14px;
    border-radius: 12px;
    margin: 10px 0;
    max-width: 80%;
    margin-left: auto;
    font-size: 14px;
    line-height: 1.4;
}

.oct-status-message {
    text-align: center;
    color: #6c757d;
    font-size: 12px;
    margin: 10px 0;
    font-style: italic;
}

.oct-status-error {
    color: #dc3545;
}

.oct-status-success {
    color: #28a745;
}

.oct-status-sending {
    color: #ffc107;
}

/* Форма сбора данных пользователя */
.oct-user-form-container {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-top: 10px;
}

.oct-user-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.oct-form-group {
    display: flex;
    flex-direction: column;
}

.oct-user-name,
.oct-user-phone {
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.oct-user-name:focus,
.oct-user-phone:focus {
    outline: none;
    border-color: var(--oct-primary-color, #007cba);
}

.oct-user-phone {
    font-family: monospace;
    letter-spacing: 0.5px;
}

.oct-phone-hint {
    font-size: 11px;
    color: #6c757d;
    margin-top: 4px;
    font-style: italic;
}

.oct-start-chat {
    background: var(--oct-primary-color, #007cba);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-top: 10px;
}

.oct-start-chat:hover {
    background: var(--oct-primary-color-dark, #005a87);
}

/* Блок с данными пользователя */
.oct-user-data-info {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-left: 4px solid var(--oct-primary-color, #007cba);
}

.oct-user-data-item {
    display: flex;
    margin-bottom: 8px;
    font-size: 14px;
}

.oct-user-data-label {
    font-weight: 600;
    min-width: 80px;
    color: #555;
}

.oct-user-data-value {
    color: #333;
}

.oct-change-data {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    margin-top: 15px;
    transition: background 0.3s ease;
    width: 100%;
    display: block;
}

.oct-change-data:hover {
    background: #545b62;
}

/* Форма ввода сообщения */
.oct-chat-form {
    padding: 20px;
    border-top: 1px solid #e9ecef;
    background: white;
}

.oct-message-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    resize: none;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 10px;
    max-height: 100px;
}

.oct-message-input:focus {
    outline: none;
    border-color: var(--oct-primary-color, #007cba);
}

.oct-send-button {
    width: 100%;
    padding: 12px;
    background: var(--oct-primary-color, #007cba);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.3s ease;
}

.oct-send-button:hover {
    background: var(--oct-primary-color-dark, #005a87);
}

.oct-send-button:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

/* Контейнер успешной отправки */
.oct-success-container {
    text-align: center;
    padding: 30px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
    animation: octFadeIn 0.5s ease;
}

.oct-success-icon {
    width: 60px;
    height: 60px;
    background: #28a745;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: bold;
    margin: 0 auto 20px;
    animation: octSuccessIcon 0.5s ease;
}

.oct-success-title {
    font-size: 18px;
    font-weight: 600;
    color: #28a745;
    margin-bottom: 15px;
}

.oct-success-message {
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    margin-bottom: 20px;
    padding: 0 10px;
}

.oct-success-message strong {
    color: #007cba;
    font-size: 16px;
    display: inline-block;
    margin-top: 5px;
    padding: 5px 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.oct-success-note {
    font-size: 13px;
    color: #6c757d;
    font-style: italic;
    padding-top: 15px;
    border-top: 1px dashed #dee2e6;
    margin-top: 15px;
}

.oct-success-note small {
    font-size: 11px;
    opacity: 0.8;
}

/* Анимации */
@keyframes octSuccessIcon {
    0% { transform: scale(0); opacity: 0; }
    70% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes octFadeIn {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .oct-chat-widget {
        bottom: 10px;
    }
    
    .oct-chat-widget.oct-position-left,
    .oct-chat-widget.oct-position-right {
        left: auto;
        right: 10px;
    }
    
    .oct-chat-window {
        width: calc(100vw - 20px);
        right: 0 !important;
        left: 0 !important;
        margin: 0 10px;
    }
    
    .oct-success-container {
        padding: 20px 15px;
    }
}
/* Добавить в конец файла после всех существующих стилей */

/* Анимация пульсации и кругов */
.oct-chat-button {
    position: relative;
    /* Существующие стили остаются */
}

/* Пульсирующий эффект */
@keyframes octPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(var(--oct-pulse-rgb, 0, 124, 186), 0.7);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(var(--oct-pulse-rgb, 0, 124, 186), 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(var(--oct-pulse-rgb, 0, 124, 186), 0);
    }
}

/* Разбегающиеся круги */
@keyframes octRipple {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Классы для анимаций */
.oct-pulse .oct-chat-button {
    animation: octPulse 2s infinite;
}

.oct-ripple .oct-chat-button::before,
.oct-ripple .oct-chat-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    border: 2px solid var(--oct-primary-color, #007cba);
    animation: octRipple 2s infinite;
}

.oct-ripple .oct-chat-button::before {
    animation-delay: 0s;
}

.oct-ripple .oct-chat-button::after {
    animation-delay: 1s;
}

/* Комбинированная анимация */
.oct-pulse-ripple .oct-chat-button {
    animation: octPulse 2s infinite;
}

.oct-pulse-ripple .oct-chat-button::before,
.oct-pulse-ripple .oct-chat-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    border: 2px solid var(--oct-primary-color, #007cba);
    animation: octRipple 2s infinite;
}

.oct-pulse-ripple .oct-chat-button::before {
    animation-delay: 0s;
}

.oct-pulse-ripple .oct-chat-button::after {
    animation-delay: 1s;
}

/* Отключение анимаций при наведении */
.oct-chat-button:hover {
    animation: none !important;
}

.oct-chat-button:hover::before,
.oct-chat-button:hover::after {
    animation: none !important;
}