/* Live Chat System - Frontend Styles - BLACK THEME & FULL SCREEN */

* {
    box-sizing: border-box;
}

/* Chat Button - BLACK */
.lcs-chat-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: #2e2e2e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    z-index: 999998;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.lcs-chat-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0,0,0,0.5);
    background: #1a1a1a;
}

.lcs-chat-button svg {
    width: 30px;
    height: 30px;
    fill: white;
}

/* Chat Container - FULL SCREEN - FIXED */
.lcs-chat-container {
    position: fixed;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    background: #3e3e3e;
    border-radius: 0 !important;
    box-shadow: none;
    display: none;
    flex-direction: column;
    z-index: 999999;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    margin: 0 !important;
    padding: 0 !important;
}

.lcs-chat-container.lcs-active {
    display: flex !important;
}

/* Welcome Screen - BLACK */
.lcs-welcome-screen {
    background: #3e3e3e;
    color: white;
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

.lcs-welcome-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.lcs-welcome-screen h1 {
    font-size: 36px;
    margin: 0 0 20px 0;
    font-weight: 600;
    color: white;
}

.lcs-welcome-screen p {
    font-size: 18px;
    margin-bottom: 40px;
    color: rgba(255,255,255,0.9);
    line-height: 1.6;
}

.lcs-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 36px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.lcs-close-btn:hover {
    opacity: 0.7;
}

.lcs-new-conversation-box {
    background: white;
    border-radius: 12px;
    padding: 30px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    max-width: 600px;
}

.lcs-new-conversation-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.lcs-new-conversation-box h3 {
    color: #333;
    font-size: 20px;
    margin: 0 0 8px 0;
    font-weight: 600;
}

.lcs-new-conversation-box p {
    color: #666;
    font-size: 15px;
    margin: 0;
}

/* Contact Form Screen - BLACK & GRAY - FULL SCREEN */
.lcs-contact-form-screen {
    background: #2e2e2e;
    color: white;
    padding: 30px;
    display: none;
    flex-direction: column;
    height: 100%;
    width: 100%;
    overflow-y: auto;
}

.lcs-contact-form-screen.lcs-active {
    display: flex;
}

.lcs-form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.lcs-form-header h2 {
    margin: 0;
    font-size: 28px;
    flex: 1;
    text-align: center;
    font-weight: 600;
    color: white;
}

.lcs-back-button {
    background: none;
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
    padding: 5px 10px;
    transition: opacity 0.2s;
    line-height: 1;
}

.lcs-back-button:hover {
    opacity: 0.7;
}

.lcs-team-avatars {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.lcs-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #3e3e3e;
    border: 1px solid #4e4e4e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    overflow: hidden;
}

.lcs-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.lcs-greeting-message {
    background: #3e3e3e;
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    font-size: 15px;
    line-height: 1.6;
    border: 1px solid #4e4e4e;
}

.lcs-form-group {
    margin-bottom: 18px;
}

.lcs-form-group input,
.lcs-form-group textarea,
.lcs-form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #4e4e4e;
    border-radius: 8px;
    font-size: 15px;
    background: #3e3e3e;
    font-family: inherit;
    color: white;
}

.lcs-form-group input::placeholder,
.lcs-form-group textarea::placeholder {
    color: #999;
}

.lcs-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.lcs-form-group input:focus,
.lcs-form-group textarea:focus,
.lcs-form-group select:focus {
    outline: none;
    border-color: #5e5e5e;
    background: #4e4e4e;
}

.lcs-phone-input-group {
    display: flex;
    gap: 0;
    align-items: stretch;
}

.lcs-country-code {
    width: 50px;
    min-width: 50px;
    flex-shrink: 0;
    padding: 14px 2px;
    font-size: 12px;
    border-radius: 8px 0 0 8px;
    border-right: none;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lcs-phone-input-group input {
    flex: 1;
    min-width: 0;
    border-radius: 0 8px 8px 0;
    border-left: 1px solid #4e4e4e;
}

.lcs-start-chat-button {
    width: 100%;
    padding: 16px;
    background: #1a1a1a;
    color: white;
    border: 2px solid #4e4e4e;
    border-radius: 8px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.lcs-start-chat-button:hover {
    background: #3e3e3e;
    border-color: #5e5e5e;
}

.lcs-start-chat-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Chat Screen - FULL SCREEN */
.lcs-chat-screen {
    display: none;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

.lcs-chat-screen.lcs-active {
    display: flex;
}

.lcs-chat-header {
    background: #2e2e2e;
    color: white;
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.lcs-header-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.lcs-header-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    overflow: hidden;
}

.lcs-header-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.lcs-header-name {
    font-size: 18px;
    font-weight: 600;
}

.lcs-header-status {
    font-size: 13px;
    opacity: 0.9;
}

/* Chat Messages - FULL HEIGHT */
.lcs-chat-messages {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    background: #f5f5f5;
}

.lcs-chat-message {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
}

.lcs-chat-message-customer {
    align-items: flex-end;
}

.lcs-chat-message-admin {
    align-items: flex-start;
}

.lcs-chat-message-content {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 14px;
    word-wrap: break-word;
    line-height: 1.5;
    font-size: 15px;
}

.lcs-chat-message-customer .lcs-chat-message-content {
    background: #3e3e3e;
    color: white;
    border-radius: 14px 14px 2px 14px;
}

.lcs-chat-message-admin .lcs-chat-message-content {
    background: white;
    color: #333;
    border: 1px solid #e0e0e0;
    border-radius: 14px 14px 14px 2px;
}

.lcs-chat-message-time {
    font-size: 11px;
    color: #999;
    margin-top: 6px;
    padding: 0 8px;
}

.lcs-typing-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px;
    background: white;
    border-radius: 14px;
    width: fit-content;
}

.lcs-typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #999;
    animation: lcs-typing 1.4s infinite;
}

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

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

@keyframes lcs-typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

/* Chat Input - FIXED AT BOTTOM */
.lcs-chat-input-area {
    padding: 18px 24px;
    background: white;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-shrink: 0;
}

.lcs-chat-input-area textarea {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 24px;
    resize: none;
    font-size: 15px;
    font-family: inherit;
    max-height: 120px;
    line-height: 1.4;
}

.lcs-chat-input-area textarea:focus {
    outline: none;
    border-color: #5e5e5e;
    box-shadow: 0 0 0 3px rgba(94, 94, 94, 0.1);
}

.lcs-send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #2e2e2e;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.lcs-send-btn:hover {
    transform: scale(1.1);
    background: #3e3e3e;
}

.lcs-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: scale(1);
}

/* Mobile Optimization */
@media (max-width: 768px) {
    .lcs-welcome-screen {
        padding: 30px 20px;
    }
    
    .lcs-welcome-screen h1 {
        font-size: 28px;
    }
    
    .lcs-contact-form-screen {
        padding: 20px;
    }
    
    .lcs-form-header h2 {
        font-size: 24px;
    }
    
    .lcs-chat-messages {
        padding: 16px;
    }
    
    .lcs-chat-message-content {
        max-width: 85%;
        font-size: 14px;
    }
}

/* Scrollbar Styling */
.lcs-chat-messages::-webkit-scrollbar,
.lcs-contact-form-screen::-webkit-scrollbar {
    width: 8px;
}

.lcs-chat-messages::-webkit-scrollbar-track,
.lcs-contact-form-screen::-webkit-scrollbar-track {
    background: transparent;
}

.lcs-chat-messages::-webkit-scrollbar-thumb,
.lcs-contact-form-screen::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.2);
    border-radius: 4px;
}

.lcs-chat-messages::-webkit-scrollbar-thumb:hover,
.lcs-contact-form-screen::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.3);
}

/* Ensure full screen on all devices */
@media screen {
    .lcs-chat-container {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
    }
}
