/**
 * Dev Telegram Chat - Styles
 */

/* Variables */
:root {
    --dtc-color: #ff6b9d;
    --dtc-size: 60px;
    --dtc-bottom: 20px;
    --dtc-side: 20px;
}

/* Widget Container */
.dtc-widget {
    position: fixed;
    bottom: var(--dtc-bottom);
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.dtc-position-right {
    right: var(--dtc-side);
}

.dtc-position-left {
    left: var(--dtc-side);
}

/* Chat Button */
.dtc-button,
button.dtc-button,
#dtc-chat-button,
button#dtc-chat-button,
.dtc-widget .dtc-button,
.dtc-widget button.dtc-button {
    width: var(--dtc-size) !important;
    height: var(--dtc-size) !important;
    border-radius: 50% !important;
    -webkit-border-radius: 50% !important;
    -moz-border-radius: 50% !important;
    background: linear-gradient(135deg, var(--dtc-color) 0%, #c44569 100%) !important;
    border: none !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    overflow: visible !important;
    padding: 0 !important;
    min-width: unset !important;
    min-height: unset !important;
    max-width: var(--dtc-size) !important;
    max-height: var(--dtc-size) !important;
    line-height: 1 !important;
    text-indent: 0 !important;
    letter-spacing: 0 !important;
}

.dtc-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(255, 107, 157, 0.5);
}

.dtc-button svg {
    width: 28px;
    height: 28px;
    color: #fff;
}

.dtc-button-icon,
.dtc-button-close {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.dtc-button-close {
    position: absolute;
    opacity: 0;
    transform: rotate(-90deg);
}

.dtc-widget.dtc-open .dtc-button-icon {
    opacity: 0;
    transform: rotate(90deg);
}

.dtc-widget.dtc-open .dtc-button-close {
    opacity: 1;
    transform: rotate(0);
}

/* Pulse Animation */
.dtc-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--dtc-color);
    opacity: 0;
    animation: dtc-pulse 2s infinite;
}

@keyframes dtc-pulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.dtc-widget.dtc-open .dtc-pulse {
    display: none;
}

/* Chat Window */
.dtc-window {
    position: absolute;
    bottom: calc(var(--dtc-size) + 15px);
    width: 350px;
    max-height: 500px;
    background: linear-gradient(135deg, #1a0a2e 0%, #2d1b4e 100%);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 107, 157, 0.3);
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s ease;
    overflow: hidden;
}

.dtc-position-right .dtc-window {
    right: 0;
}

.dtc-position-left .dtc-window {
    left: 0;
}

.dtc-widget.dtc-open .dtc-window {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Header */
.dtc-header {
    background: rgba(255, 107, 157, 0.15);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dtc-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dtc-avatar {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #0088cc 0%, #00aced 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dtc-avatar svg {
    width: 26px;
    height: 26px;
    color: #fff;
}

.dtc-header-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dtc-title {
    color: #fff;
    font-weight: 600;
    font-size: 16px;
}

.dtc-status {
    color: #b8a5d6;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.dtc-status-dot {
    width: 8px;
    height: 8px;
    background: #00d9a5;
    border-radius: 50%;
    animation: dtc-blink 2s infinite;
}

@keyframes dtc-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.dtc-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.dtc-close:hover {
    background: rgba(255, 71, 87, 0.3);
}

.dtc-close svg {
    width: 18px;
    height: 18px;
    color: #fff;
}

/* Body */
.dtc-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    min-height: 150px;
    max-height: 250px;
}

.dtc-messages {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dtc-message {
    max-width: 85%;
}

.dtc-message-bot {
    align-self: flex-start;
}

.dtc-message-user {
    align-self: flex-end;
}

.dtc-message-content {
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
}

.dtc-message-bot .dtc-message-content {
    background: rgba(255, 255, 255, 0.1);
    color: #e0d4f7;
    border-bottom-left-radius: 4px;
}

.dtc-message-user .dtc-message-content {
    background: linear-gradient(135deg, var(--dtc-color) 0%, #c44569 100%);
    color: #fff;
    border-bottom-right-radius: 4px;
}

/* Footer */
.dtc-footer {
    padding: 15px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dtc-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.dtc-input {
    flex: 1;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
}

.dtc-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.dtc-input:focus {
    border-color: var(--dtc-color);
    background: rgba(255, 255, 255, 0.15);
}

.dtc-send {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--dtc-color) 0%, #c44569 100%);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.dtc-send:hover {
    transform: scale(1.1);
}

.dtc-send svg {
    width: 18px;
    height: 18px;
    color: #fff;
}

.dtc-telegram-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #0088cc 0%, #00aced 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
}

.dtc-telegram-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 136, 204, 0.4);
    color: #fff;
}

.dtc-telegram-btn svg {
    width: 20px;
    height: 20px;
}

.dtc-powered {
    text-align: center;
    color: #b8a5d6;
    font-size: 11px;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .dtc-widget {
        bottom: 15px;
    }
    
    .dtc-position-right {
        right: 15px;
    }
    
    .dtc-position-left {
        left: 15px;
    }
    
    .dtc-window {
        width: calc(100vw - 30px);
        max-width: 350px;
        bottom: calc(var(--dtc-size) + 10px);
    }
    
    .dtc-position-right .dtc-window {
        right: 0;
    }
    
    .dtc-position-left .dtc-window {
        left: 0;
    }
    
    .dtc-body {
        max-height: 200px;
    }
}

/* Scrollbar */
.dtc-body::-webkit-scrollbar {
    width: 5px;
}

.dtc-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.dtc-body::-webkit-scrollbar-thumb {
    background: rgba(255, 107, 157, 0.5);
    border-radius: 3px;
}

.dtc-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 107, 157, 0.7);
}
