/**
 * BTChat Plugin Styles
 * Version: 1.0.0
 */

	/* blue: #000E6B
	red: #d63637
	grey: #465362 */

/* Container */
#btchat-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Chat Button */
.btchat-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
    background: linear-gradient(135deg, #000E6B 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.btchat-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.btchat-button.active {
    animation: none;
}

.btchat-tooltiptext {
    display: none;
    position: absolute;
    width: 330px;
    margin-left: -340px;
    bottom: 40%;
    transition: opacity 0.3s;
    background-color: #000E6B;
    color: #fff;
    padding: 10px 15px;
    z-index: 1;
    border-radius: 6px;
    transition: opacity 0.3s ease, display 0.3s allow-discrete;
}

.btchat-tooltiptext-p {

}

.btchat-close {
    visibility: hidden;
    display: none;
    position: absolute;
    width: 30px;
    margin-left: 30px;
    bottom: 105%;
    background-color: #d63637 !important;
    color: #fff;
    padding: 10px 15px;
    z-index: 1;
    border-radius: 6px;
    text-align: center;
}

.btchat-close:hover {
    text-decoration: none;
}

#btchat-container:hover .btchat-tooltiptext,
#btchat-container:hover .btchat-close {
    display: block;
    visibility: visible;    
}

/* .btchat-button:hover .btchat-tooltiptext-p {
    opacity: 1;
} */

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    50% {
        box-shadow: 0 4px 20px rgba(102, 126, 234, 0.5);
    }
}

@keyframes btchat-rotate-bounce {
  0% {
    transform: scale(1) rotate(0deg);
  }
  10% {
    transform: scale(1.15) rotate(-10deg);
  }
  20% {
    transform: scale(1.2) rotate(10deg);
  }
  30% {
    transform: scale(1.15) rotate(-10deg);
  }
  40% {
    transform: scale(1.2) rotate(10deg);
  }
  50% {
    transform: scale(1.1) rotate(0deg);
  }
  60% {
    transform: scale(1.05) rotate(-5deg);
  }
  70% {
    transform: scale(1.1) rotate(5deg);
  }
  80% {
    transform: scale(1.05) rotate(-5deg);
  }
  90% {
    transform: scale(1.02) rotate(2deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
  }
}

.btchat-attention {
  animation: btchat-rotate-bounce 1.2s cubic-bezier(.36,1.56,.64,1) both;
  z-index: 10001;
}

/* Chat Window */
.btchat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 500px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Chat Header */
.btchat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btchat-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.btchat-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.btchat-close:hover {
    opacity: 0.8;
}

/* Chat Body */
.btchat-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
}

.btchat-messages {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btchat-message {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btchat-message p {
    margin: 0;
    padding: 12px 16px;
    border-radius: 18px;
    max-width: 70%;
    word-wrap: break-word;
    line-height: 1.4;
}

.btchat-message-bot p {
    background: white;
    color: #333;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btchat-message-user {
    justify-content: flex-end;
}

.btchat-message-user p {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

/* Chat Footer */
.btchat-footer {
    padding: 15px;
    background: white;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 10px;
}

.btchat-input {
    flex: 1;
    border: 1px solid #e0e0e0;
    border-radius: 24px;
    padding: 12px 18px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.btchat-input:focus {
    border-color: #667eea;
}

.btchat-send {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btchat-send:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btchat-send:active {
    transform: scale(0.95);
}

/* Scrollbar Styles */
.btchat-body::-webkit-scrollbar {
    width: 6px;
}

.btchat-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.btchat-body::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.btchat-body::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Responsive */
@media (max-width: 480px) {
    .btchat-window {
        width: calc(100vw - 40px);
        height: calc(100vh - 100px);
        right: 0;
        left: 0;
        margin: 0 auto;
    }
    
    #btchat-container {
        right: 20px;
        left: auto;
    }
}

