/*--------------------------------------------------------------
# Conversation Side Panel
--------------------------------------------------------------*/

.conversation-side-panel .create-feature-list {
    gap: 14px;
}

.conversation-side-panel .create-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}


/*--------------------------------------------------------------
# Conversation Page / WhatsApp Style
--------------------------------------------------------------*/

.conversation-chat-card {
    background: #ffffff;
    border-radius: 28px;
    border: 1px solid rgba(15, 23, 42, 0.07);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    position: relative;
}


/*--------------------------------------------------------------
# Chat Header
--------------------------------------------------------------*/

.conversation-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 22px;
    background: linear-gradient(135deg, #f8fcff 0%, #eef8ff 100%);
    border-bottom: 1px solid rgba(80, 197, 255, 0.16);
    flex-wrap: wrap;
}

.conversation-chat-user {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.conversation-chat-user-text {
    min-width: 0;
}

.conversation-chat-avatar {
    width: 56px;
    height: 56px;
    min-width: 56px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #50c5ff 0%, #20a4e6 100%);
    color: #ffffff;
    font-size: 1.15rem;
    font-weight: 700;
    box-shadow: 0 12px 24px rgba(80, 197, 255, 0.28);
}

.conversation-chat-user h4 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    font-family: var(--nav-font);
}

.conversation-chat-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.conversation-chat-meta .chip {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(80, 197, 255, 0.16);
    color: #0f172a;
    font-weight: 600;
}


/*--------------------------------------------------------------
# Top Direction Hint
--------------------------------------------------------------*/

.chat-direction-hint {
    display: flex;
    justify-content: center;
    padding: 10px 16px 0;
    background: #ffffff;
}

.chat-direction-hint span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
    background: rgba(80, 197, 255, 0.08);
    border: 1px solid rgba(80, 197, 255, 0.16);
    padding: 8px 14px;
    border-radius: 999px;
}

.chat-direction-hint i {
    color: #50c5ff;
}


/*--------------------------------------------------------------
# Status Chips
--------------------------------------------------------------*/

.status-active {
    background: rgba(34, 197, 94, 0.12) !important;
    color: #166534 !important;
    border-color: rgba(34, 197, 94, 0.22) !important;
}

.status-draft {
    background: rgba(148, 163, 184, 0.12) !important;
    color: #475569 !important;
    border-color: rgba(148, 163, 184, 0.22) !important;
}

.status-public-chip {
    background: rgba(59, 130, 246, 0.1) !important;
    color: #1d4ed8 !important;
    border-color: rgba(59, 130, 246, 0.2) !important;
}

.status-private-chip {
    background: rgba(168, 85, 247, 0.1) !important;
    color: #7e22ce !important;
    border-color: rgba(168, 85, 247, 0.2) !important;
}


/*--------------------------------------------------------------
# Chat Stream
--------------------------------------------------------------*/

.whatsapp-chat-stream {
    position: relative;
    background: linear-gradient(rgba(247, 250, 252, 0.95), rgba(247, 250, 252, 0.95)), radial-gradient( circle at top left, rgba(80, 197, 255, 0.05), transparent 28%), radial-gradient( circle at bottom right, rgba(80, 197, 255, 0.06), transparent 24%);
    padding: 24px 20px 18px;
    max-height: 72vh;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.whatsapp-chat-stream::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient( rgba(15, 23, 42, 0.03) 1px, transparent 1px);
    background-size: 22px 22px;
    pointer-events: none;
    opacity: 0.38;
}

.whatsapp-chat-stream>* {
    position: relative;
    z-index: 1;
}

.whatsapp-chat-stream::-webkit-scrollbar {
    width: 8px;
}

.whatsapp-chat-stream::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.16);
    border-radius: 999px;
}

.whatsapp-chat-stream::-webkit-scrollbar-track {
    background: transparent;
}


/*--------------------------------------------------------------
# Date Separator
--------------------------------------------------------------*/

.wa-date-separator {
    display: flex;
    justify-content: center;
    margin: 18px 0 14px;
}

.wa-date-separator span {
    background: rgba(255, 255, 255, 0.95);
    color: #475569;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 7px 13px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}


/*--------------------------------------------------------------
# Message Rows
--------------------------------------------------------------*/

.wa-row {
    display: flex;
    margin-bottom: 14px;
    width: 100%;
}

.wa-me {
    justify-content: flex-end;
}

.wa-other {
    justify-content: flex-start;
}

.wa-bubble-wrap {
    max-width: min(78%, 760px);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wa-me .wa-bubble-wrap {
    align-items: flex-end;
}

.wa-other .wa-bubble-wrap {
    align-items: flex-start;
}


/*--------------------------------------------------------------
# Sender Name
--------------------------------------------------------------*/

.wa-meta-name {
    font-size: 0.78rem;
    font-weight: 700;
    color: #2563eb;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.wa-me .wa-meta-name {
    color: #0f766e;
}

.wa-role {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
    color: #475569;
}


/*--------------------------------------------------------------
# Bubble
--------------------------------------------------------------*/

.wa-bubble {
    position: relative;
    min-width: 220px;
    padding: 10px 12px 8px;
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(15, 23, 42, 0.05);
    overflow: hidden;
}

.wa-other .wa-bubble {
    background: #ffffff;
    color: #0f172a;
    border-top-left-radius: 6px;
}

.wa-me .wa-bubble {
    background: linear-gradient(180deg, #dcf8e8 0%, #d6f5e2 100%);
    color: #0f172a;
    border-top-right-radius: 6px;
}

.wa-bubble::after {
    content: "";
    position: absolute;
    top: 0;
    width: 14px;
    height: 14px;
    background: inherit;
    border: inherit;
    border-bottom: none;
    transform: rotate(45deg);
    z-index: 0;
}

.wa-other .wa-bubble::after {
    left: -6px;
    border-right: none;
    border-top: none;
}

.wa-me .wa-bubble::after {
    right: -6px;
    border-left: none;
    border-top: none;
}

.wa-bubble>* {
    position: relative;
    z-index: 1;
}


/*--------------------------------------------------------------
# Reply Snippet
--------------------------------------------------------------*/

.wa-reply-snippet {
    border-left: 4px solid #50c5ff;
    background: rgba(80, 197, 255, 0.08);
    padding: 8px 10px;
    border-radius: 12px;
    margin-bottom: 8px;
    transition: all 0.25s ease;
}

.wa-me .wa-reply-snippet {
    background: rgba(15, 118, 110, 0.08);
    border-left-color: #0f766e;
}

.wa-reply-snippet:hover {
    transform: translateY(-1px);
}

.wa-reply-label {
    font-size: 0.76rem;
    font-weight: 700;
    color: #2563eb;
    margin-bottom: 3px;
}

.wa-me .wa-reply-label {
    color: #0f766e;
}

.wa-reply-text {
    font-size: 0.84rem;
    color: #475569;
    line-height: 1.45;
    word-break: break-word;
}


/*--------------------------------------------------------------
# Message Text
--------------------------------------------------------------*/

.wa-text {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #0f172a;
    white-space: pre-wrap;
    word-break: break-word;
    padding-right: 42px;
}


/*--------------------------------------------------------------
# Bubble Footer
--------------------------------------------------------------*/

.wa-footer {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-end;
    margin-top: 10px;
}

.wa-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.wa-action-btn {
    border: none;
    background: rgba(15, 23, 42, 0.05);
    color: #334155;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 0.76rem;
    font-weight: 600;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.wa-action-btn:hover {
    background: rgba(80, 197, 255, 0.14);
    color: #0369a1;
    transform: translateY(-1px);
}

.wa-time {
    font-size: 0.72rem;
    color: #64748b;
    white-space: nowrap;
    padding-bottom: 2px;
}


/*--------------------------------------------------------------
# Composer
--------------------------------------------------------------*/

.wa-composer-card {
    border-top: 1px solid rgba(15, 23, 42, 0.06);
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    padding: 16px 18px 18px;
    position: sticky;
    bottom: 0;
    z-index: 5;
}

.wa-composer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.wa-sending-role {
    font-size: 0.88rem;
    color: #475569;
    font-weight: 500;
}

.wa-sending-role strong {
    color: #0f172a;
}

.wa-composer-bar {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 24px;
    padding: 10px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.wa-composer-input {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    resize: none;
    min-height: 46px;
    max-height: 150px;
    padding: 8px 10px !important;
    font-size: 0.95rem;
    line-height: 1.55;
    color: #0f172a;
}

.wa-composer-input::placeholder {
    color: #94a3b8;
}

.wa-composer-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.wa-circle-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: rgba(15, 23, 42, 0.06);
    color: #334155;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}

.wa-circle-btn:hover {
    background: rgba(80, 197, 255, 0.18);
    color: #0369a1;
    transform: translateY(-1px);
}

.wa-send-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #50c5ff 0%, #1798d8 100%);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 12px 24px rgba(80, 197, 255, 0.28);
    transition: all 0.25s ease;
}

.wa-send-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 16px 30px rgba(80, 197, 255, 0.34);
}


/*--------------------------------------------------------------
# Reply Preview
--------------------------------------------------------------*/

.wa-reply-preview {
    display: none;
    align-items: center;
    gap: 12px;
    background: rgba(80, 197, 255, 0.08);
    border: 1px solid rgba(80, 197, 255, 0.16);
    border-left: 4px solid #50c5ff;
    border-radius: 18px;
    padding: 10px 12px;
    margin-bottom: 12px;
}

.wa-reply-preview.show {
    display: flex;
}

.wa-reply-preview-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: #0369a1;
    margin-bottom: 2px;
}

.wa-reply-preview-text {
    font-size: 0.86rem;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wa-reply-close {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 50%;
    border: none;
    background: rgba(15, 23, 42, 0.06);
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}

.wa-reply-close:hover {
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
}


/*--------------------------------------------------------------
# Floating Scroll Button
--------------------------------------------------------------*/

.floating-scroll-down {
    position: absolute;
    right: 18px;
    bottom: 102px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #50c5ff 0%, #1798d8 100%);
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(80, 197, 255, 0.28);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 6;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.25s ease;
}

.floating-scroll-down.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.floating-scroll-down:hover {
    transform: translateY(-2px);
}


/*--------------------------------------------------------------
# Empty State
--------------------------------------------------------------*/

.questions-empty-card {
    background: rgba(255, 255, 255, 0.86);
    border: 1px dashed rgba(80, 197, 255, 0.24);
    border-radius: 24px;
    padding: 34px 22px;
    text-align: center;
}

.questions-empty-icon {
    font-size: 2rem;
    color: #50c5ff;
}


/*--------------------------------------------------------------
# Bottom Cards
--------------------------------------------------------------*/

.bottom-cards {
    margin-top: 24px !important;
}

.bottom-card-alt {
    background: #ffffff;
    border-radius: 22px;
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.05);
    padding: 22px 18px;
    transition: all 0.28s ease;
}

.bottom-card-alt:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.bottom-card-alt-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.bottom-card-alt-icon {
    width: 46px;
    height: 46px;
    min-width: 46px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(80, 197, 255, 0.12);
    color: #50c5ff;
    font-size: 1.1rem;
}

.bottom-card-alt h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
}

.bottom-card-alt p {
    margin: 0;
    color: #475569;
    line-height: 1.7;
    font-size: 0.92rem;
}


/*--------------------------------------------------------------
# Smooth jump target highlight
--------------------------------------------------------------*/

.wa-row:target .wa-bubble {
    animation: targetPulse 1.3s ease;
    box-shadow: 0 0 0 4px rgba(80, 197, 255, 0.18), 0 10px 24px rgba(15, 23, 42, 0.08);
}

@keyframes targetPulse {
    0% {
        transform: scale(0.985);
    }
    40% {
        transform: scale(1.01);
    }
    100% {
        transform: scale(1);
    }
}


/*--------------------------------------------------------------
# Topbar Buttons
--------------------------------------------------------------*/

.create-topbar .btn-2,
.create-topbar .btn-3 {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}


/*--------------------------------------------------------------
# Tablet
--------------------------------------------------------------*/

@media (max-width: 991px) {
    .conversation-side-panel .create-info-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .wa-bubble-wrap {
        max-width: 88%;
    }
    .whatsapp-chat-stream {
        max-height: 68vh;
        padding: 18px 14px 14px;
    }
    .conversation-chat-header {
        padding: 18px 16px;
    }
    .wa-composer-card {
        padding: 14px;
    }
}


/*--------------------------------------------------------------
# Mobile
--------------------------------------------------------------*/

@media (max-width: 767px) {
    .conversation-side-panel .create-info-grid {
        grid-template-columns: 1fr;
    }
    .conversation-chat-avatar {
        width: 48px;
        height: 48px;
        min-width: 48px;
        font-size: 1rem;
    }
    .conversation-chat-user h4 {
        font-size: 0.98rem;
    }
    .conversation-chat-meta {
        width: 100%;
    }
    .conversation-chat-meta .chip {
        font-size: 0.74rem;
    }
    .wa-bubble-wrap {
        max-width: 94%;
    }
    .wa-bubble {
        min-width: auto;
        width: 100%;
        padding: 10px 10px 8px;
    }
    .wa-text {
        font-size: 0.92rem;
        padding-right: 0;
    }
    .wa-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .wa-time {
        align-self: flex-end;
    }
    .wa-actions {
        width: 100%;
    }
    .wa-action-btn {
        font-size: 0.72rem;
        padding: 6px 9px;
    }
    .wa-composer-top {
        align-items: stretch;
    }
    .wa-composer-bar {
        border-radius: 20px;
        padding: 8px;
    }
    .wa-circle-btn,
    .wa-send-btn {
        width: 42px;
        height: 42px;
    }
    .floating-scroll-down {
        right: 14px;
        bottom: 96px;
        width: 42px;
        height: 42px;
    }
    .chat-direction-hint {
        padding: 10px 12px 0;
    }
    .chat-direction-hint span {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}