/* Guest Chat Widget - AdminLTE 2 Green & White Theme */

#guest-chat-button-wrapper {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

#guest-chat-button {
    width: 60px;
    height: 60px;
    background: transparent;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 166, 90, 0.4);
    transition: all 0.3s ease;
    border: 3px solid white;
    overflow: hidden;
}

#guest-chat-button img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

#guest-chat-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 166, 90, 0.5);
}

#guest-chat-button:active {
    transform: scale(0.95);
}

#guest-chat-button-text {
    margin-top: 8px;
    color: #00a65a;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

#guest-chat-button-text:hover {
    color: #008d4c;
    transform: translateY(-2px);
}

#guest-chat-container {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 380px;
    height: 550px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 6px 25px rgba(0,0,0,0.15);
    display: none;
    flex-direction: column;
    z-index: 9998;
    font-family: 'Source Sans Pro', sans-serif;
    overflow: hidden;
}

#guest-chat-container.open {
    display: flex;
}

.guest-chat-header {
    background: #00a65a;
    color: white;
    padding: 12px 15px;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.guest-chat-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    flex: 1;
}

.guest-chat-header h4 i {
    margin-right: 8px;
    font-size: 18px;
}

.btn-close-chat {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 5px 8px;
    width: auto;
    height: auto;
    min-width: 30px;
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
    line-height: 1;
}

.btn-close-chat .close-icon {
    display: inline-block;
    font-size: 24px;
    line-height: 1;
    color: white;
    font-weight: bold;
    width: 24px;
    height: 24px;
    text-align: center;
}

.btn-close-chat:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.btn-close-chat:hover i {
    color: white;
}

.btn-close-chat:active {
    transform: scale(0.95);
}

.guest-chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: #f9f9f9;
    min-height: 0;
}

/* Custom scrollbar */
.guest-chat-body::-webkit-scrollbar {
    width: 6px;
}

.guest-chat-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.guest-chat-body::-webkit-scrollbar-thumb {
    background: #00a65a;
    border-radius: 3px;
}

.guest-chat-body::-webkit-scrollbar-thumb:hover {
    background: #008d4c;
}

.guest-chat-welcome {
    text-align: center;
    color: #666;
    padding: 20px;
}

.guest-chat-loading {
    text-align: center;
    color: #00a65a;
    padding: 20px;
}

.guest-chat-message {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

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

.guest-chat-message.support-message {
    align-items: flex-start;
}

.guest-chat-message-content {
    max-width: 75%;
    padding: 10px 12px;
    border-radius: 8px;
    word-wrap: break-word;
}

.guest-message .guest-chat-message-content {
    background: #00a65a;
    color: white;
    border-bottom-right-radius: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.support-message .guest-chat-message-content {
    background: white;
    color: #333;
    border: 1px solid #e0e0e0;
    border-bottom-left-radius: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

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

.guest-chat-system-message {
    text-align: center;
    color: #666;
    font-size: 12px;
    padding: 10px;
    font-style: italic;
}

.guest-chat-warning {
    background: #fff3cd;
    color: #856404;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
    font-size: 12px;
    border-left: 3px solid #ffc107;
}

.guest-chat-warning i {
    margin-right: 5px;
}

.guest-chat-footer {
    border-top: 1px solid #e0e0e0;
    padding: 12px;
    background: white;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
}

#guest-chat-mobile-container {
    display: flex;
    gap: 0;
    align-items: stretch;
    width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

#guest-chat-mobile-container input {
    flex: 1 1 0%;
    min-width: 0;
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    border-right: none;
    font-size: 14px;
    margin: 0;
    outline: none;
    box-sizing: border-box;
}

#guest-chat-mobile-container input:focus {
    border-color: #00a65a;
    z-index: 1;
}

#guest-chat-mobile-container button {
    padding: 8px 16px;
    background: #00a65a;
    color: white;
    border: 1px solid #00a65a;
    border-left: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    padding-left: 12px;
    white-space: nowrap;
    flex-shrink: 0;
    flex-grow: 0;
    outline: none;
    box-sizing: border-box;
}

#guest-chat-mobile-container button:hover {
    background: #008d4c;
}

#guest-chat-input-container {
    display: flex;
    gap: 6px;
    align-items: stretch;
    width: 100%;
}

#guest-chat-message-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}

#guest-chat-message-input:focus {
    border-color: #00a65a;
    box-shadow: 0 0 0 2px rgba(0, 166, 90, 0.1);
}

#guest-chat-send-btn {
    padding: 10px 20px;
    background: #00a65a;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    min-width: 60px;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 166, 90, 0.2);
    white-space: nowrap;
}

#guest-chat-send-btn:hover {
    background: #008d4c;
    box-shadow: 0 3px 6px rgba(0, 166, 90, 0.3);
    transform: translateY(-1px);
}

#guest-chat-send-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 166, 90, 0.2);
}

#guest-chat-send-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

#guest-chat-otp-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

#guest-chat-otp-container input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 18px;
    margin: 0;
    outline: none;
    box-sizing: border-box;
    text-align: center;
    letter-spacing: 4px;
    font-weight: 600;
}

#guest-chat-otp-container input:focus {
    border-color: #00a65a;
    box-shadow: 0 0 0 2px rgba(0, 166, 90, 0.1);
}

#guest-chat-verify-btn {
    padding: 8px 16px;
    background: #00a65a;
    color: white;
    border: 1px solid #00a65a;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    width: 100%;
    outline: none;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

#guest-chat-verify-btn:hover {
    background: #008d4c;
}

#guest-chat-verify-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

#guest-chat-resend-btn {
    background: transparent;
    border: none;
    color: #00a65a;
    cursor: pointer;
    font-size: 12px;
    text-decoration: underline;
    padding: 4px 0;
    margin: 0;
    outline: none;
    transition: color 0.2s ease;
}

#guest-chat-resend-btn:hover {
    color: #008d4c;
}

.guest-chat-file-label {
    padding: 10px 14px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
    font-size: 16px;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    transition: all 0.2s ease;
}

.guest-chat-file-label:hover {
    background: #e8e8e8;
    border-color: #00a65a;
    color: #00a65a;
}

/* Responsive */
@media (max-width: 768px) {
    #guest-chat-container {
        width: calc(100% - 40px);
        height: calc(100vh - 100px);
        right: 20px;
        left: 20px;
        bottom: 90px;
    }
}

