/* Support Chat Widget Styles - Extracted from base.html */
#supportChatWidget {
    position: fixed;
    right: 110px; /* Moved left to avoid overlap with back-to-top button */
    bottom: 24px;
    z-index: 9999;
    font-family: Arial, sans-serif;
}

#supportChatToggle {
    background: #0f172a;
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 12px 18px;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.2);
    cursor: pointer;
}

#supportChatPanel {
    width: 320px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.15);
    margin-top: 12px;
    overflow: hidden;
}

.chat-hidden {
    display: none;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #0f172a;
    color: #fff;
}

#supportChatClose {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
}

.chat-messages {
    height: 240px;
    overflow-y: auto;
    padding: 12px 16px;
    background: #f8fafc;
}

.chat-bubble {
    padding: 8px 10px;
    border-radius: 10px;
    margin-bottom: 8px;
    font-size: 13px;
}

.chat-bubble.user {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    max-width: 80%;
}

.chat-bubble.admin {
    background: #e0f2fe;
    border: 1px solid #bae6fd;
    max-width: 80%;
    margin-left: auto;
}

.chat-guest {
    padding: 0 16px 10px;
    display: grid;
    gap: 8px;
}

.chat-guest input {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px;
    font-size: 13px;
}

.chat-quick-replies {
    padding: 0 16px 10px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.chat-quick {
    background: #e2e8f0;
    border: none;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    cursor: pointer;
}

.chat-input {
    display: flex;
    gap: 6px;
    padding: 12px 16px 16px;
    align-items: center;
}

.chat-attach {
    background: #e2e8f0;
    color: #0f172a;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 12px;
    cursor: pointer;
}

.chat-file-input {
    display: none;
}

.chat-input input {
    flex: 1;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px;
    font-size: 13px;
}

.chat-attachment-list {
    display: grid;
    gap: 6px;
    margin-top: 6px;
}

.chat-attachment-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border-radius: 8px;
    background: #f1f5f9;
    font-size: 12px;
    text-decoration: none;
    color: #0f172a;
}

.chat-attachment-item img {
    width: 100px;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: #fff;
}

.chat-input button {
    background: #0f172a;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
}

/* Buy Now Button for Product Cards */
.buy-now-btn-card {
    padding: 12px 20px;
    background: linear-gradient(135deg, #fcbe00 0%, #ffa500 100%);
    color: #111827;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(252, 190, 0, 0.3);
}

.buy-now-btn-card:hover {
    background: linear-gradient(135deg, #ffa500 0%, #fcbe00 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(252, 190, 0, 0.4);
    color: #000;
}

.buy-now-btn-card:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Floating notifications (success/error) */
.vm-floating-alert {
    position: fixed !important;
    top: 16px;
    right: 16px;
    z-index: 9999;
    width: min(420px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    margin: 0;
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
    padding: 12px 44px 12px 14px;
    font-size: 15px;
    line-height: 1.35;
    overflow-wrap: anywhere;
    animation: vmAlertInDesktop 0.25s ease-out;
}

.vm-floating-alert .btn-close {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 6px;
    font-size: 11px;
    opacity: 0.7;
}

.vm-floating-alert .btn-close:hover {
    opacity: 1;
}

.vm-floating-note {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 99999;
    width: min(380px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.2);
    padding: 12px 14px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
    overflow-wrap: anywhere;
    animation: vmAlertInDesktop 0.25s ease-out;
}

@keyframes vmAlertInDesktop {
    from {
        transform: translateX(24px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes vmAlertInMobile {
    from {
        transform: translateY(-16px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (max-width: 1199.98px) {
    .vm-floating-alert {
        top: calc(env(safe-area-inset-top, 0px) + 10px);
        left: 12px;
        right: 12px;
        width: auto;
        max-width: none;
        padding: 11px 40px 11px 12px;
        font-size: 14px;
        line-height: 1.3;
        animation: vmAlertInMobile 0.25s ease-out;
    }

    .vm-floating-alert .btn-close {
        top: 8px;
        right: 8px;
    }

    .vm-floating-note {
        top: calc(env(safe-area-inset-top, 0px) + 10px);
        left: 12px;
        right: 12px;
        width: auto;
        max-width: none;
        padding: 11px 12px;
        font-size: 13px;
        animation: vmAlertInMobile 0.25s ease-out;
    }
}
