/* V2 Messenger Mockup Styles */
.mockup-v2 {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #101014;
    display: flex;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #fff;
    border-radius: 18px; /* inner screen radius */
    overflow: hidden;
}

/* Sidebar */
.v2-sidebar {
    width: 35%;
    max-width: 280px;
    background: #15151A;
    border-right: 1px solid #2A2A35;
    display: flex;
    flex-direction: column;
}

.v2-sidebar-header {
    padding: 16px;
}

.v2-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px 0;
}

.v2-search-row {
    display: flex;
    gap: 8px;
}

.v2-search-box {
    flex: 1;
    background: #22222A;
    border-radius: 8px;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #7A7A85;
    font-size: 12px;
}

.v2-search-box svg {
    width: 12px;
    height: 12px;
}

.v2-filter {
    background: #22222A;
    border-radius: 8px;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    cursor: pointer;
}

.v2-filter svg {
    width: 10px;
    height: 10px;
}

.v2-contacts {
    flex: 1;
    overflow-y: auto;
    padding: 0 8px 8px;
    pointer-events: none; /* Prevent scrolling but keep scrollbar visible */
}

.v2-contacts::-webkit-scrollbar { width: 4px; }
.v2-contacts::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }

.v2-contact {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: 2px;
}

.v2-contact:hover {
    background: rgba(255,255,255,0.02);
}

.v2-contact.active {
    background: #22222C;
}

.v2-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    position: relative;
    flex-shrink: 0;
}

.v2-avatar.large {
    width: 40px;
    height: 40px;
    font-size: 16px;
}

.v2-badge-count {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: #E11D48;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #15151A;
}

.v2-badge-dot {
    position: absolute;
    top: 0px;
    left: 0px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 2px solid #15151A;
}

.v2-badge-dot.green { background: #10B981; }
.v2-badge-dot.red { background: #E11D48; }
.v2-badge-dot.insta { 
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); 
    bottom: 0; right: 0; top: auto; left: auto;
}

.v2-contact-body {
    flex: 1;
    min-width: 0;
}

.v2-contact-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.v2-name {
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.v2-time {
    font-size: 10px;
    color: #7A7A85;
}

.v2-contact-bottom {
    display: flex;
    align-items: center;
}

.v2-msg-preview {
    font-size: 11px;
    color: #7A7A85;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.v2-msg-preview.highlight {
    color: #D1D1D6;
}

/* Chat Area */
.v2-chat {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #101014;
    min-width: 0; /* prevent overflow */
}

.v2-chat-header {
    padding: 12px 16px;
    border-bottom: 1px solid #2A2A35;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.v2-chat-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.v2-user-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.v2-user-meta {
    font-size: 11px;
    color: #A1A1AA;
    display: flex;
    align-items: center;
    gap: 6px;
}

.v2-pill {
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 9px;
    font-weight: 600;
    white-space: nowrap;
}

.v2-pill.red-pill {
    background: rgba(225, 29, 72, 0.15);
    color: #E11D48;
}

.v2-pill.green-pill {
    background: rgba(16, 185, 129, 0.1);
    color: #10B981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.v2-chat-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.v2-btn-outline {
    background: transparent;
    border: 1px solid #3F3F46;
    color: #D1D1D6;
    padding: 6px 12px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}

.v2-btn-outline svg {
    width: 12px;
    height: 12px;
}

.v2-btn-icon {
    background: transparent;
    border: none;
    color: #A1A1AA;
    cursor: pointer;
    padding: 6px;
}

.v2-btn-icon svg {
    width: 14px;
    height: 14px;
}

.v2-chat-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    pointer-events: none; /* Prevent scrolling but keep scrollbar visible */
}

.v2-chat-scroll::-webkit-scrollbar { width: 4px; }
.v2-chat-scroll::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }

.v2-chat-date {
    align-self: center;
    background: #1C1C22;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 10px;
    color: #7A7A85;
    margin-bottom: 16px;
}

.v2-msg {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
    max-width: 75%;
}

.v2-msg.client {
    align-self: flex-start;
    opacity: 0;
    animation: v2FadeUp 0.8s 0.5s ease-out forwards;
}

.v2-msg.bot {
    align-self: flex-end;
    opacity: 0;
    animation: v2FadeUp 0.8s 2.5s ease-out forwards;
}

.v2-bubble {
    padding: 10px 14px;
    font-size: 12px;
    line-height: 1.4;
    border-radius: 14px;
    position: relative;
}

.v2-msg.client .v2-bubble {
    background: #22222A;
    color: #E4E4E7;
    border-bottom-left-radius: 4px;
}

.v2-msg.bot .v2-bubble {
    background: linear-gradient(135deg, #E11D48 0%, #BE123C 100%);
    color: #fff;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 16px rgba(225, 29, 72, 0.2);
}

.v2-msg-time {
    font-size: 9px;
    color: #7A7A85;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.v2-msg-time svg {
    width: 10px;
    height: 10px;
}

.v2-msg.bot .v2-msg-time {
    align-self: flex-end;
}

.v2-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    align-self: flex-end;
    justify-content: flex-end;
    opacity: 0;
    animation: v2FadeUp 0.8s 5.0s ease-out forwards;
}

.v2-action {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    background: transparent;
    white-space: nowrap;
}

.v2-action svg {
    width: 12px;
    height: 12px;
}

.v2-action.primary {
    border: 1px solid #E11D48;
    color: #E11D48;
}

.v2-action.secondary {
    border: 1px solid #3F3F46;
    color: #A1A1AA;
}

.v2-info-card {
    background: #18181D;
    border: 1px solid #2A2A35;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 16px;
    align-self: flex-end;
    width: 80%;
    max-width: 320px;
    opacity: 0;
    animation: v2FadeUp 0.8s 5.0s ease-out forwards;
}

.v2-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.v2-card-header h3 {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
}

.v2-card-header a {
    color: #E11D48;
    font-size: 11px;
    text-decoration: none;
}

.v2-card-row {
    display: flex;
    margin-bottom: 8px;
    font-size: 11px;
}

.v2-card-row:last-child {
    margin-bottom: 0;
}

.v2-card-row .label {
    width: 100px;
    color: #7A7A85;
}

.v2-card-row .val {
    color: #E4E4E7;
}

.v2-chat-input-area {
    padding: 12px 16px 16px;
    background: #101014;
}

.v2-input-box {
    background: #1A1A21;
    border-radius: 20px;
    padding: 6px 6px 6px 16px;
    display: flex;
    align-items: center;
}

.v2-input-box input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 12px;
    outline: none;
    min-width: 0;
}

.v2-input-box input::placeholder {
    color: #52525B;
}

.v2-attach {
    background: transparent;
    border: none;
    color: #7A7A85;
    cursor: pointer;
    padding: 6px;
}

.v2-attach svg {
    width: 14px;
    height: 14px;
}

.v2-send {
    background: #E11D48;
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: 6px;
    flex-shrink: 0;
}

.v2-send svg {
    width: 12px;
    height: 12px;
}

@keyframes v2FadeUp {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Mobile Fixes */
@media (max-width: 768px) {
    .v2-sidebar {
        display: none !important;
    }
}
