/* --- PREMIUM WALLET UI (Phase 40) --- */
.eco-wallet-summary-premium {
    padding: 30px !important;
    background: #ffffff !important;
    border: 1px solid rgba(134, 169, 13, 0.15) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
}

.eco-wallet-grid-v2 {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 25px;
}

.eco-wallet-stat-card {
    display: flex;
    gap: 20px;
    align-items: center;
    padding: 20px;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: background-color 0.2s, transform 0.15s;
}

.eco-wallet-stat-card:hover {
    transform: translateY(-1px);
    background: #fafafa;
    border-color: rgba(0, 0, 0, 0.12);
}

.eco-stat-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.eco-stat-icon.pri {
    background: rgba(134, 169, 13, 0.1);
    color: var(--eco-pri);
}

.eco-stat-icon.dark {
    background: rgba(28, 28, 30, 0.05);
    color: #1c1c1e;
}

.eco-stat-icon .material-symbols-outlined {
    font-size: 28px;
}

.eco-stat-info {
    flex: 1;
    min-width: 0;
}

.eco-wallet-amount-v2 {
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
    margin-top: 8px;
    letter-spacing: -1px;
    max-width: 500px;
    width: 100%;
}

.eco-wallet-amount-v2 small {
    font-size: 18px;
    font-weight: 600;
    margin-left: 2px;
}

.eco-wallet-amount-v2.pri {
    color: var(--eco-pri);
}

.eco-wallet-amount-v2.dark {
    color: #1c1c1e;
}

.eco-refresh-pill {
    display: flex;
    align-items: center;
    gap: 5px;
    background: #fff;
    border: 1px solid rgba(134, 169, 13, 0.2);
    color: var(--eco-pri);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 9px;
    font-weight: 800;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.eco-refresh-pill:hover {
    background: var(--eco-pri);
    color: #fff;
    border-color: var(--eco-pri);
}

.eco-refresh-pill .material-symbols-outlined {
    font-size: 14px;
}

.eco-wallet-footer-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: rgba(134, 169, 13, 0.05);
    border-radius: 12px;
    color: #555;
    font-size: 13px;
}

.eco-wallet-footer-info .material-symbols-outlined {
    font-size: 18px;
    color: var(--eco-pri);
}

/* Premium Form Styles */
.eco-wallet-request-premium {
    padding: 30px !important;
}

.eco-card-header-v2 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.eco-card-header-v2 .material-symbols-outlined {
    font-size: 24px;
    color: var(--eco-pri);
}

.eco-wd-form-v2 {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.eco-input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 15px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.eco-input-wrapper .material-symbols-outlined {
    font-size: 20px;
    color: #999;
}

.eco-input-wrapper.top-align {
    align-items: flex-start;
    padding-top: 12px;
}

.eco-input-v2,
.eco-textarea-v2 {
    flex: 1;
    background: transparent;
    border: none !important;
    padding: 14px 0 !important;
    font-size: 15px;
    font-weight: 500;
    color: #333;
    outline: none !important;
}

.eco-textarea-v2 {
    min-height: 100px;
    resize: none;
    overflow-y: auto;
}

.eco-input-wrapper:focus-within {
    background: #fff;
    border-color: var(--eco-pri);
    box-shadow: 0 0 0 4px rgba(134, 169, 13, 0.1);
}

.eco-input-v2::placeholder,
.eco-textarea-v2::placeholder {
    color: #bbb;
}

.eco-btn-premium-v6 {
    background: linear-gradient(135deg, var(--eco-pri) 0%, #76950b 100%);
    color: #fff;
    border: none;
    padding: 16px 25px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform 0.15s, background-color 0.15s;
    box-shadow: 0 2px 8px rgba(134, 169, 13, 0.3);
}

.eco-btn-premium-v6:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(134, 169, 13, 0.4);
}

.eco-btn-premium-v6:active {
    transform: translateY(0);
}

/* Withdrawal Chat UI (User Dashboard) */
.eco-wd-chat {
    background: #fdfdfd;
    border-radius: 12px;
    padding: 15px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.03);
    animation: ecoFadeIn 0.3s ease;
    width: 100% !important;
    /* Always full width */
    margin-top: 15px;
    order: 10;
    /* Ensure it wraps to the bottom */
}

/* Enhanced Chat Attachments */
.eco-wd-chat-previews-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 12px;
    padding: 10px 15px;
}

.eco-wd-chat-previews-container:empty {
    display: none;
}

.eco-wd-preview-item {
    position: relative;
    width: 90px;
    height: 90px;
    border-radius: 12px;
    overflow: visible !important;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: #f8f8f8;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.eco-wd-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

.eco-wd-remove-attachment {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 24px;
    height: 24px;
    background: #ff4d4d;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    z-index: 999;
    transition: transform 0.15s;
    line-height: 1;
    border: 2px solid #fff;
}

.eco-wd-remove-attachment:hover {
    background: #e60000;
    transform: scale(1.2);
}

@media (max-width: 600px) {
    .eco-list-item {
        flex-wrap: wrap !important;
        /* Allow wrapping */
        align-items: flex-start !important;
        padding: 18px 15px !important;
    }

    .eco-item-icon {
        margin-top: 2px;
        flex: 0 0 40px;
    }

    .eco-item-main {
        flex: 1;
        min-width: 0;
    }

    .eco-item-right {
        margin-top: 2px;
        text-align: right;
        flex: 0 0 auto;
    }

    .eco-wd-chat {
        padding: 12px 0;
        margin-left: 0 !important;
        width: 100% !important;
        /* Full width row */
        order: 10;
        /* Put it at the bottom */
    }

    .eco-chat-messages {
        max-height: 250px !important;
    }

    .eco-item-title {
        font-size: 14px;
    }

    .eco-amount-v6 {
        font-size: 15px;
    }

    .eco-wd-chat form {
        width: 100%;
    }

    /* Premium Wallet Mobile Refinement */
    .eco-wallet-summary-premium,
    .eco-wallet-request-premium {
        padding: 20px !important;
    }

    .eco-wallet-grid-v2 {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .eco-wallet-stat-card {
        padding: 15px;
    }

    .eco-wallet-amount-v2 {
        font-size: 28px;
    }

    .eco-stat-icon {
        width: 48px;
        height: 48px;
    }

    /* Withdrawal Form Mobile Fix */
    .eco-wd-form-v2 .eco-input-wrapper {
        width: 100% !important;
        display: flex;
        flex-direction: row;
        align-items: center;
    }

    .eco-wd-form-v2 .eco-btn-premium-v6 {
        width: 100% !important;
        padding: 16px !important;
    }
}

.eco-chat-messages::-webkit-scrollbar {
    width: 4px;
}

.eco-chat-messages::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

/* MODERN CHAT INTERFACE (Zalo/Messenger Style) */
.eco-chat-messages {
    max-height: 350px !important;
    overflow-y: auto;
    padding: 15px;
    background: #fdfdfd !important;
    border-radius: 12px;
    display: flex !important;
    flex-direction: column;
    gap: 15px;
    scroll-behavior: smooth;
}

.eco-chat-messages::-webkit-scrollbar {
    width: 4px;
}

.eco-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.eco-chat-messages::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.eco-chat-wrapper {
    display: flex !important;
    margin-bottom: 20px;
    max-width: 100%;
    position: relative;
    gap: 12px;
    align-items: flex-end;
}

.eco-chat-wrapper.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.eco-chat-wrapper.admin {
    align-self: flex-start;
}

.eco-chat-bubble {
    padding: 10px 15px;
    border-radius: 18px;
    font-size: 13px;
    line-height: 1.5;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.eco-chat-wrapper.user .eco-chat-bubble {
    background: var(--eco-pri);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.eco-chat-wrapper.admin .eco-chat-bubble {
    background: #000;
    color: #fff;
    border-bottom-left-radius: 4px;
}

.eco-chat-bubble img {
    max-width: 120px !important;
    width: auto !important;
    height: auto !important;
    border-radius: 10px;
    display: block;
    margin: 5px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.eco-chat-meta {
    font-size: 10px;
    margin-top: 4px;
    color: #999;
    font-weight: 600;
}

.eco-chat-wrapper.user .eco-chat-meta {
    text-align: right;
}

.eco-chat-wrapper.admin .eco-chat-meta {
    text-align: left;
}

.eco-chat-avatar-mini {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    border-radius: 50% !important;
    align-self: flex-end;
    background: #f1f1f1;
    border: 1px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    object-fit: cover !important;
    flex-shrink: 0;
    display: block !important;
}

.eco-chat-send-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.eco-chat-send-btn span {
    font-family: 'Material Icons' !important;
    font-weight: normal;
    font-style: normal;
    display: inline-block;
    line-height: 1;
    text-transform: none;
    letter-spacing: normal;
    word-wrap: normal;
    white-space: nowrap;
    direction: ltr;
}

.eco-chat-send-btn.loading {
    opacity: 0.6;
    pointer-events: none;
}

.eco-chat-send-btn.loading span {
    animation: eco-spin 1s infinite linear;
}

@keyframes eco-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

