/* Admin Console Conversation Name */
.admin-convo-name {
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
    display: inline-block;
    vertical-align: middle;
}
/* Admin Console Conversation Badge */
.admin-convo-badge {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #007bff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transition: background 0.2s;
    border: 2px solid #fff;
}
.admin-convo-badge.inactive {
    background: #e9ecef;
    border: 2px solid #ccc;
    cursor: default;
}
html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
    background: linear-gradient(to right, #f0f4ff, #f8fbff);
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

.bolder {
    font-weight: bolder;
}

.services, .why-choose, .testimonials, .contact {
    padding: 4rem 1rem;
}

.text-gray-600 {
    --tw-text-opacity: 1;
    color: rgb(75 85 99 / var(--tw-text-opacity, 1));
}

.bg-white-95 {
    background-color: rgb(255 255 255 / 0.95);
}

/* Ensure feature items are always left-aligned on all devices */
.d-flex.align-items-center.mb-2 {
    justify-content: flex-start !important;
    text-align: left !important;
}

.text-white {
    --tw-text-opacity: 1;
    color: rgb(255 255 255 / var(--tw-text-opacity, 1));
}

.sm-img {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
}

/*footer start*/
.py-12 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.bg-gray-900 {
    --tw-bg-opacity: 1;
    background-color: rgb(17 24 39 / var(--tw-bg-opacity, 1));
}

/*footer end*/

/* Scroll to Top Button */
#scrollToTopBtn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease-in-out;
    font-size: 18px;
}

#scrollToTopBtn:hover {
    background-color: #0056b3;
    transform: translateY(0) scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.4);
}

#scrollToTopBtn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#scrollToTopBtn i {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.contact-icon-container {
    width: 3rem;
    height: 3rem;
    border-radius: 8px;
    align-items: center;
    align-content: center;
    text-align: center;
    margin-right: 10px;
}

.bg-teal-100 {
    --tw-bg-opacity: 1;
    background-color: rgb(204 251 241 / var(--tw-bg-opacity, 1));
}

.text-teal-600 {
    --tw-text-opacity: 1;
    color: rgb(13 148 136 / var(--tw-text-opacity, 1));
}

.bg-green-100 {
    --tw-bg-opacity: 1;
    background-color: rgb(220 252 231 / var(--tw-bg-opacity, 1));
}

.text-green-600 {
    --tw-text-opacity: 1;
    color: rgb(22 163 74 / var(--tw-text-opacity, 1));
}

.social-whatsapp-icon {
    font-size: 30px !important;
    padding-left: 10px;
}

/* WhatsApp Widget Styles */
.whatsapp-widget {
    position: fixed;
    bottom: 80px;
    right: 30px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.whatsapp-button {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #25D366; /* Standard WhatsApp green color */
    color: white;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.whatsapp-button:hover {
    background-color: #1da851; /* Slightly darker green for hover state */
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.whatsapp-button i {
    font-size: 24px;
}

.whatsapp-tooltip {
    position: relative;
    background-color: #ffffff;
    color: #333;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 14px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 8px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    pointer-events: none;
    font-weight: 500;
}

.whatsapp-widget:hover .whatsapp-tooltip {
    opacity: 1;
    transform: translateY(0);
}

/* Floating Buttons - Bottom Right Corner */
.floating-buttons {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 1000;
    pointer-events: none; /* Container doesn't block interactions */
}

.floating-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    text-decoration: none;
    backdrop-filter: blur(10px);
    pointer-events: auto; /* Individual buttons can be clicked */
    position: relative; /* Ensure proper stacking context */
}

.floating-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    color: white;
    text-decoration: none;
}

/* Go Up Button */
.go-up-btn {
    background: linear-gradient(135deg, #2d8bff, #1e6dd6);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    position: fixed !important;
    bottom: 140px; 
    right: 20px;
}

.go-up-btn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.go-up-btn:hover {
    background: linear-gradient(135deg, #1e6dd6, #0056b3);
}

/* WhatsApp Button */
.whatsapp-btn {
    background: linear-gradient(135deg, #25d366, #128c7e);
}

.whatsapp-btn:hover {
    background: linear-gradient(135deg, #128c7e, #075e54);
}

/* Anonymous Chat Animation */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Chat Button */
.chat-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.chat-btn:hover {
    background: linear-gradient(135deg, #764ba2, #5a67d8);
}

/* Dentor Chat Styles */
.dentor-chat-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 15px 25px;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dentor-chat-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.6);
}

.dentor-chat-button i {
    font-size: 18px;
}

.dentor-chat-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4757;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.dentor-chat-badge.hidden {
    display: none;
}

.dentor-chat-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 380px;
    height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.dentor-chat-container.minimized {
    display: none;
}

.dentor-chat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dentor-chat-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.dentor-chat-controls button {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    margin-left: 10px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.dentor-chat-controls button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.dentor-chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dentor-chat-message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
}

.dentor-chat-message.sent {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
}

.dentor-chat-message.received {
    background: white;
    color: #333;
    align-self: flex-start;
    border: 1px solid #e9ecef;
    border-bottom-left-radius: 5px;
}

.dentor-chat-message-time {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 4px;
    text-align: right;
}

.dentor-chat-input {
    padding: 15px;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.dentor-chat-input textarea {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 10px 15px;
    resize: none;
    font-family: inherit;
    font-size: 14px;
    max-height: 80px;
    outline: none;
}

.dentor-chat-input textarea:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.dentor-chat-input button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.dentor-chat-input button:hover {
    transform: scale(1.05);
}

.dentor-chat-input button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.dentor-chat-typing {
    padding: 10px 15px;
    color: #666;
    font-style: italic;
    font-size: 12px;
}

.dentor-chat-connection-status {
    padding: 8px 15px;
    background: #fff3cd;
    border-bottom: 1px solid #ffeaa7;
    color: #856404;
    font-size: 12px;
    text-align: center;
}

.dentor-chat-connection-status.connected {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.dentor-chat-connection-status.error {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .dentor-chat-container {
        bottom: 10px;
        right: 10px;
        left: 10px;
        width: auto;
        height: 70vh;
        max-height: 500px;
    }
    
    .dentor-chat-button {
        bottom: 20px;
        right: 20px;
        padding: 12px 20px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .dentor-chat-container {
        height: 80vh;
        border-radius: 0;
        bottom: 0;
        right: 0;
        left: 0;
    }
    
    .dentor-chat-header {
        border-radius: 0;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .whatsapp-widget {
        bottom: 70px;
        right: 15px;
    }

    .whatsapp-button {
        width: 50px;
        height: 50px;
    }

    .whatsapp-button i {
        font-size: 26px;
    }

@media (max-width: 768px) {
    .floating-buttons {
        bottom: 15px;
        right: 15px;
        gap: 12px;
    }

    .floating-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .go-up-btn {
        bottom: 160px; /* Adjust for mobile: 85px + 60px + 15px = 160px */
        right: 15px;
    }
}
}

@media (max-width: 576px) {
    .floating-buttons {
        bottom: 12px;
        right: 12px;
        gap: 10px;
    }

    .floating-btn {
        width: 45px;
        height: 45px;
        font-size: 18px;
        box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
    }

    .floating-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 16px rgba(0, 0, 0, 0.3);
    }

    .go-up-btn {
        bottom: 147px; /* Adjust for smaller mobile: 82px + 45px + 10px = 137px, but account for chat widget size */
        right: 12px;
        width: 45px;
        height: 45px;
    }
}
}

@media (max-width: 400px) {
    .floating-buttons {
        bottom: 10px;
        right: 10px;
        gap: 8px;
    }

    .floating-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    }

    .go-up-btn {
        bottom: 138px; /* Adjust for smallest mobile: 80px + 40px + 8px = 128px, add buffer */
        right: 10px;
        width: 40px;
        width: 40px;
        height: 40px;
    }

    .floating-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    }
}

/* Ensure floating buttons don't interfere with page layout */
@media (max-width: 768px) {
    body {
        padding-right: 0 !important;
        margin-right: 0 !important;
    }

    .container, .container-fluid {
        padding-right: 15px !important;
        margin-right: 0 !important;
    }
}

/* Prevent any layout shift when buttons appear/disappear */
.floating-buttons * {
    box-sizing: border-box;
}

/* Admin Chat Styles */
.conversation-item {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.conversation-item:hover {
    background-color: #f8f9fa;
}

.conversation-item.active {
    background-color: #007bff !important;
    color: white !important;
}

.conversation-item.active .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
}

#adminChatMessages {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
}

.message-bubble {
    max-width: 75%;
    word-wrap: break-word;
}

.message-bubble.bg-primary {
    background-color: #007bff !important;
}

.message-bubble.bg-light {
    background-color: #f8f9fa !important;
    border: 1px solid #dee2e6;
}

.max-width-75 {
    max-width: 75%;
}

.message-time {
    text-align: right;
    margin-top: 2px;
}

.bg-primary .message-time .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Admin Chat Messages Scrollbar */
#adminChatMessages::-webkit-scrollbar {
    width: 6px;
}

#adminChatMessages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

#adminChatMessages::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

#adminChatMessages::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Responsive adjustments for admin chat */
@media (max-width: 768px) {
    .message-bubble {
        max-width: 90%;
    }
    
    .max-width-75 {
        max-width: 90%;
    }
}

/* Floating Chat Button */
.chat-btn {
    background: linear-gradient(135deg, #007bff, #0056b3) !important;
    position: relative;
}

.chat-btn:hover {
    background: linear-gradient(135deg, #0056b3, #004085) !important;
    transform: scale(1.1);
}

.chat-notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    border: 2px solid white;
}
