/* AI Chat Bot Styles */
:root {
    --chat-bg: rgba(0, 0, 0, 0.3);
    --chat-message-bg: rgba(30, 30, 30, 0.7);
    --chat-user-bg: rgba(50, 50, 50, 0.7);
    --chat-input-bg: rgba(40, 40, 40, 0.7);
    --chat-border: rgba(255, 255, 255, 0.1);
    --chat-text: rgba(255, 255, 255, 0.9);
    --chat-text-secondary: rgba(255, 255, 255, 0.6);
    --chat-accent: var(--primary-color);
    --chat-radius: 12px;
    --chat-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

body {
    background-color: #121212;
    color: var(--chat-text);
}

/* Chat Container */
.chat-container {
    max-width: 1000px;
    margin: 0 auto;
    background-color: var(--chat-bg);
    border-radius: var(--chat-radius);
    box-shadow: var(--chat-shadow);
    backdrop-filter: blur(10px);
    border: 1px solid var(--chat-border);
    display: flex;
    flex-direction: column;
    height: 85vh;
    min-height: 700px;
    overflow: hidden;
}

/* Chat Header */
.chat-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid var(--chat-border);
}

.chat-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--chat-text);
}

.chat-subtitle {
    color: var(--chat-text-secondary);
    font-size: 1rem;
    margin-bottom: 0;
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.message {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    max-width: 85%;
}

.message.user-message {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--chat-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.user-avatar {
    background-color: #444;
}

.message-content {
    background-color: var(--chat-message-bg);
    padding: 12px 16px;
    border-radius: 18px;
    border-top-left-radius: 4px;
    color: var(--chat-text);
    line-height: 1.5;
    position: relative;
}

.user-message .message-content {
    background-color: var(--chat-user-bg);
    border-radius: 18px;
    border-top-right-radius: 4px;
}

.message-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.message:hover .message-actions {
    opacity: 1;
}

.message-action-btn {
    background: none;
    border: none;
    color: var(--chat-text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.message-action-btn:hover {
    color: var(--chat-text);
    background-color: rgba(255, 255, 255, 0.1);
}

/* Chat Input */
.chat-input-container {
    padding: 15px 20px;
    border-top: 1px solid var(--chat-border);
    background-color: var(--chat-bg);
}

.input-with-button {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.attach-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--chat-text);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    align-self: flex-end;
}

.attach-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.chat-input {
    flex: 1;
    padding: 12px 15px;
    border-radius: 24px;
    border: 1px solid var(--chat-border);
    background-color: var(--chat-input-bg);
    color: var(--chat-text);
    resize: none;
    max-height: 120px;
    transition: all 0.2s ease;
}

.chat-input:focus {
    outline: none;
    border-color: var(--chat-accent);
    box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.3);
}

.send-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--chat-accent);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    align-self: flex-end;
}

.send-button:disabled {
    background-color: #555;
    cursor: not-allowed;
    opacity: 0.7;
}

.send-button:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(var(--primary-color-rgb), 0.5);
}

/* Message Counter */
.message-counter {
    font-size: 0.8rem;
    color: var(--chat-text-secondary);
    text-align: right;
    padding: 5px 10px;
}

/* Chat Footer */
.chat-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--chat-border);
    display: flex;
    justify-content: center;
}

.unlock-message {
    font-size: 0.9rem;
    color: var(--chat-text-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sign-in-btn {
    background-color: var(--chat-accent);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.sign-in-btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    color: white;
    text-decoration: none;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 15px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background-color: var(--chat-text-secondary);
    border-radius: 50%;
    animation: typing-animation 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
    animation-delay: 0s;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing-animation {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.6;
    }
    30% {
        transform: translateY(-5px);
        opacity: 1;
    }
}

/* Toast Notification */
#toast-notification {
    visibility: hidden;
    min-width: 250px;
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    border-radius: 8px;
    padding: 16px;
    position: fixed;
    z-index: 9999;
    left: 50%;
    transform: translateX(-50%);
    bottom: 30px;
    font-size: 1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
}

#toast-notification.show {
    visibility: visible;
    opacity: 1;
}

/* Social Sharing Styles */
.social-sharing-container {
    margin-top: 30px;
    margin-bottom: 30px;
    text-align: center;
    padding: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.social-sharing-title {
    font-size: 1.4rem;
    color: var(--chat-text);
    margin-bottom: 20px;
    font-weight: 600;
}

.social-sharing-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--chat-text);
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 1.6rem;
}

.social-icon:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.twitter-icon:hover {
    background: #1DA1F2;
    color: white;
}

.facebook-icon:hover {
    background: #4267B2;
    color: white;
}

.linkedin-icon:hover {
    background: #0077B5;
    color: white;
}

.whatsapp-icon:hover {
    background: #25D366;
    color: white;
}

.email-icon:hover {
    background: #D44638;
    color: white;
}

/* Scrollbar Styling */
.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* File Preview Styles */
.file-preview-container {
    display: flex;
    gap: 10px;
    padding: 10px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--chat-border);
}

.file-preview-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--chat-input-bg);
    border: 1px solid var(--chat-border);
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-preview-item .file-icon {
    font-size: 2rem;
    color: var(--chat-text-secondary);
}

.file-preview-item .file-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 0.6rem;
    padding: 2px 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-remove-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: rgba(255, 0, 0, 0.8);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    transition: all 0.2s ease;
}

.file-remove-btn:hover {
    background-color: rgba(255, 0, 0, 1);
    transform: scale(1.1);
}

.file-attachment-indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 0.8rem;
    margin-top: 5px;
}

.file-attachment-indicator i {
    font-size: 0.9rem;
}

/* Message with attachments */
.message-attachments {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.message-attachment {
    max-width: 200px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--chat-border);
}

.message-attachment img {
    width: 100%;
    height: auto;
    display: block;
}

.message-attachment.document {
    padding: 8px;
    background-color: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 8px;
}

.message-attachment.document i {
    font-size: 1.5rem;
}

/* Narrow content below the tool (page content only) */
.chat-container ~ .social-content-container .page-content {
    max-width: 820px;
    margin: 0 auto;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .chat-container {
        height: 80vh;
        margin: 10px;
    }
    
    .chat-header h1 {
        font-size: 2rem;
    }
    
    .message {
        max-width: 90%;
    }
    
    .chat-input-container {
        padding: 10px;
    }
    
    .file-preview-item {
        width: 60px;
        height: 60px;
    }
}
