﻿/* ============================================
   CONVERSATION COMPONENT - MAIN STYLES
   ============================================ */

/* ----- ROOT CONTAINER ----- */
.conversation {
    /* Main container styles */
}

    .conversation .con-main-container {
        border: 1px solid rgb(47, 45, 45);
        box-shadow: 0 0 12px rgba(0, 0, 0, .1);
    }


    /* ============================================
   HEADER SECTION
   ============================================ */

    .conversation .con-m-header {
        height: 40px;
        background-color: rgb(27, 25, 37);
        border-bottom: 1px solid rgb(47, 45, 45);
    }

        .conversation .con-m-header .conm-h-textbox {
            background: rgb(30, 30, 30);
            color: var(--mud-palette-drawer-icon);
        }

            .conversation .con-m-header .conm-h-textbox div {
                color: var(--mud-palette-drawer-icon);
            }

        /* ----- Header Arrows ----- */
        .conversation .con-m-header .conv-arrow {
            position: absolute;
            top: 0;
            right: -12px;
            z-index: 50;
            display: block;
            width: 0;
            height: 100%;
            border: 18px solid transparent;
            border-right: 1px none black;
            border-left-width: 12px;
            border-left-color: rgb(30, 30, 30);
            -moz-border-right-colors: rgb(57, 57, 57);
        }

        .conversation .con-m-header .conv-arrow-border {
            position: absolute;
            top: 0;
            right: -13px;
            z-index: 49;
            display: block;
            width: 0;
            height: 100%;
            border: 18px solid transparent;
            border-right: 1px none black;
            border-left-width: 12px;
            border-left-color: rgb(90, 90, 90);
            -moz-border-right-colors: rgb(57, 57, 57);
        }


    /* ============================================
   CONTEXT / CONTENT AREA
   ============================================ */

    .conversation .con-m-contexts {
        padding: 15px;
    }

    .conversation .conm-c-box {
        margin: 15px auto;
        padding: 15px;
        background: #14141412;
        border-width: 1px;
        border-color: rgb(51, 51, 51);
        border-radius: 10px;
        box-shadow: 0 0 12px rgba(0, 0, 0, 0.3);
    }


    /* ============================================
   MESSAGE SEND BUTTON
   ============================================ */

    .conversation .conver-msg-sendbtn {
        width: 40px;
        height: 30px;
        color: var(--btn-selected-secondary);
        border-radius: 5px 20px 20px 5px;
    }

.convo-msgtext-box {
    max-width: 300px;
    padding: 5px 10px;
    word-break: break-word;
    background: var(--mud-palette-action-disabled-background);
}

.conversation .conver-msg-action-btn {
    display: flex;
    gap: 10px;
    padding: 5px 10px;
    background: var(--mud-palette-primary);
    border-radius: 15px;
    box-shadow: rgba(0, 0, 0, 0.3) 0px 19px 38px, rgba(0, 0, 0, 0.22) 0px 15px 12px;
}


/* ============================================
   MODERN CONVERSATION LAYOUT (MAIN UI)
   ============================================ */

.conversation-modern {
    display: flex;
    flex-direction: column;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #fff;
}


/* ----- Conversation Header (Modern) ----- */
.conversation-header {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    z-index: 10;
    min-height: 60px;
    padding: 12px 16px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-back {
    margin-right: 8px;
}

    .header-back button {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 4px;
        color: #60a5fa;
        border-radius: 50%;
        transition: background 0.2s;
    }

        .header-back button:hover {
            background: rgba(96, 165, 250, 0.1);
        }

.header-info {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
}

.header-avatars {
    position: relative;
    display: flex;
    margin-bottom: 2px;
}

.avatar-sm {
    width: 28px;
    height: 28px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.avatar-offset {
    margin-left: -10px;
}

.header-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    color: #fff;
}

.header-subtitle {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
}

.header-actions {
    display: flex;
    gap: 4px;
}

    .header-actions button {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 6px;
        color: rgba(255, 255, 255, 0.5);
        border-radius: 50%;
        transition: all 0.2s;
    }

        .header-actions button:hover {
            color: #fff;
            background: rgba(255, 255, 255, 0.05);
        }


/* ----- Messages Container ----- */
.conversation-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px 8px;
    scroll-behavior: smooth;
}

    .conversation-messages::-webkit-scrollbar {
        width: 3px;
    }

    .conversation-messages::-webkit-scrollbar-track {
        background: transparent;
    }

    .conversation-messages::-webkit-scrollbar-thumb {
        background: var(--primary-color);
        border-radius: 10px;
    }


/* ----- Message Info Card ----- */
.message-info-card {
    margin-bottom: 16px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    backdrop-filter: blur(8px);
}

.info-card-content {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.info-icon {
    margin-top: 2px;
    font-size: 20px;
}

.info-text {
    flex: 1;
}

.info-title {
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #60a5fa;
}

.info-details,
.info-points {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.info-label {
    color: rgba(255, 255, 255, 0.4);
}

.info-value {
    color: #fff;
}

    .info-value.gold {
        color: #fbbf24;
    }

.copy-btn {
    padding: 0 4px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
}

    .copy-btn:hover {
        color: #fff;
    }


/* ----- Individual Messages ----- */
.message-wrapper {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    animation: messageSlide 0.3s ease-out;
}

    .message-wrapper.message-user {
        flex-direction: row-reverse;
    }

        .message-wrapper.message-user .message-content {
            align-items: flex-end;
        }

        .message-wrapper.message-user .message-bubble {
            color: #fff;
           /* background: linear-gradient(135deg, #2563eb, #1d4ed8);*/
            background: var(--primary-color);
            border-bottom-right-radius: 4px;
        }

    .message-wrapper.message-other .message-bubble {
        color: #e5e7eb;
        background: rgba(255, 255, 255, 0.06);
        border-bottom-left-radius: 4px;
    }

.message-avatar {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
}

    .message-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border: 1px solid rgba(255, 255, 255, 0.06);
        border-radius: 50%;
    }

.message-wrapper.message-user .message-avatar {
    order: 2;
}

.message-content {
    display: flex;
    flex-direction: column;
    max-width: 85%;
}

.message-sender {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
}

.message-time {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.25);
}

.message-bubble {
    padding: 8px 14px;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}


/* ----- Message Image ----- */
.message-image {
    position: relative;
    max-width: 280px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
}

    .message-image img {
        display: block;
        width: 100%;
        max-height: 300px;
        object-fit: cover;
    }

.image-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.2s;
}

.message-image:hover .image-overlay {
    opacity: 1;
}

.view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 8px;
    font-size: 24px;
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
}

    .view-btn:hover {
        background: rgba(0, 0, 0, 0.7);
    }


/* ----- Message Link ----- */
.message-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    text-decoration: none;
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.15);
    border-radius: 12px;
    transition: all 0.2s;
}

    .message-link:hover {
        background: rgba(37, 99, 235, 0.15);
    }

.link-icon {
    font-size: 20px;
}

.link-text {
    font-size: 13px;
    font-weight: 500;
    color: #60a5fa;
    text-decoration: none;
}


/* ----- Typing Indicator ----- */
.typing-indicator {
    display: flex;
    gap: 6px;
    margin-left: 42px;
    padding: 8px 0;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out;
}

    .typing-dot:nth-child(2) {
        animation-delay: 0.2s;
    }

    .typing-dot:nth-child(3) {
        animation-delay: 0.4s;
    }


/* ----- Confirmation Badge ----- */
.confirmation-badge {
    margin: 8px 0;
}


/* ============================================
   COMPOSE / INPUT AREA
   ============================================ */

.conversation-compose {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 8px;
    padding: 8px 12px 12px;
    /*background: rgba(18, 14, 26, 0.9);*/
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    border-bottom-right-radius: 10px;
    border-bottom-left-radius: 10px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.compose-actions {
    display: flex;
    gap: 2px;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    color: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    transition: all 0.2s;
}

    .action-btn:hover {
        color: #fff;
        background: rgba(255, 255, 255, 0.05);
    }

.compose-input-wrapper {
    flex: 1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    transition: border-color 0.2s;
}

    .compose-input-wrapper:focus-within {
        border-color: rgba(37, 99, 235, 0.3);
    }

.compose-input {
    width: 100%;
    min-height: 40px;
    max-height: 120px;
    padding: 8px 16px;
    font-family: inherit;
    font-size: 14px;
    color: #fff;
    background: transparent;
    border: none;
    outline: none;
    resize: vertical;
}

    .compose-input::placeholder {
        color: rgba(255, 255, 255, 0.3);
    }

.send-btn {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-radius: 50%;
    transition: all 0.2s;
}

    .send-btn:hover:not(.disabled) {
        transform: scale(1.05);
        box-shadow: 0 4px 20px rgba(37, 99, 235, 0.3);
    }

    .send-btn.disabled {
        cursor: not-allowed;
        opacity: 0.3;
    }


/* ============================================ CLOSE MESSAGE ============================================ */
.conv-ios-close-message {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    /*background: rgba(244, 67, 54, 0.06);*/
    border-radius: 12px;
    /*border-left: 3px solid #f44336;*/
    margin: 4px 0;
}

.close-icon {
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 1px;
}

.close-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.close-title {
    font-size: 13px;
    font-weight: 600;
    color: #f44336;
}

.close-description {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

/* ============================================ ISSUE MESSAGE ============================================ */
.conv-ios-issue-message {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(255, 152, 0, 0.06);
    border-radius: 12px;
    border-left: 1px solid #ff9800;
    margin: 4px 0;
}

.issue-icon {
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 1px;
}

.issue-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.issue-title {
    font-size: 13px;
    font-weight: 600;
    color: #ff9800;
}

.issue-description {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.4;
}

.issue-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    padding: 6px 14px;
    background: rgba(42, 163, 215, 0.12);
    border-radius: 8px;
    color: #64b5f6;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    align-self: flex-start;
}

    .issue-link:hover {
        background: rgba(42, 163, 215, 0.2);
        transform: translateY(-1px);
    }

.issue-link-icon {
    font-size: 14px;
}

.convorow-loader {
    position: absolute;
    top: 5px;
    left: -25px;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes messageSlide {
    from {
        transform: translateY(8px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes popIn {
    from {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 0;
    }

    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes typingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.2;
    }

    30% {
        transform: translateY(-8px);
        opacity: 1;
    }
}


/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 600px) {
    .message-content {
        max-width: 85%;
    }

    .message-bubble {
        padding: 6px 12px;
        font-size: 13px;
    }

    .header-title {
        font-size: 13px;
    }

    .conversation-compose {
        padding: 6px 8px 10px;
    }

    .message-image {
        max-width: 200px;
    }

    .menu-popup {
        min-width: 160px;
        margin: 0 16px;
    }
}
