/**
 * Payment Message Component CSS
 * Beautiful animated payment cards for chat
 * 
 * COOKBOOK-COMPLIANT STYLING
 * Part of: Payments Domain
 * 
 * @author BroJack Agent #3
 * @date October 22, 2025
 */

/* Payment Message Card */
.payment-message {
    display: flex;
    flex-direction: column; /* Stack payment card and reactions vertically */
    align-items: flex-end; /* Align to right for sent messages */
    margin: 12px 0;
    animation: slideInPayment 0.3s ease-out;
    position: relative; /* Allow absolute positioning for reactions */
}

.payment-message.received {
    align-items: flex-start; /* Align to left for received messages */
}

.payment-card {
    background: linear-gradient(135deg, #555DFF 0%, #7B83FF 100%);
    border-radius: 16px;
    padding: 20px;
    max-width: 320px;
    box-shadow: 0 8px 24px rgba(85, 93, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.payment-message.received .payment-card {
    background: linear-gradient(135deg, #38394F 0%, #4A4C66 100%);
    box-shadow: 0 8px 24px rgba(56, 57, 79, 0.3);
}

/* Header with icon and amount */
.payment-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.payment-icon {
    font-size: 32px;
    animation: bounce 2s infinite;
}

.payment-amount {
    font-family: 'Montserrat', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #FFFFFF;
}

/* Memo/Message */
.payment-memo {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 12px;
    color: #FFFFFF;
    font-size: 14px;
    line-height: 1.4;
}

/* Status Indicator */
.payment-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 500;
}

.status-pending {
    background: rgba(255, 184, 0, 0.2);
    color: #FFB800;
}

.status-sent {
    background: rgba(85, 93, 255, 0.2);
    color: #7B83FF;
}

.status-confirmed {
    background: rgba(0, 217, 140, 0.2);
    color: #00D98C;
}

.status-failed {
    background: rgba(255, 71, 87, 0.2);
    color: #FF4757;
}

/* Explorer Link */
.payment-explorer {
    margin-bottom: 12px;
}

.explorer-link {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.explorer-link:hover {
    color: #FFFFFF;
    gap: 8px;
}

/* Direction Label */
.payment-direction {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
}

/* Timestamp */
.payment-message .message-time {
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    text-align: right;
}

/* Reactions below payment card */
.payment-message .reaction-container {
    width: 100%; /* Match payment card width */
    max-width: 320px; /* Same as payment card */
    margin-top: 4px;
    display: flex;
    justify-content: flex-end; /* Align to right for sent */
}

.payment-message.received .reaction-container {
    justify-content: flex-start; /* Align to left for received */
}

/* Animations */
@keyframes slideInPayment {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.payment-pending-animation .payment-icon {
    animation: bounce 1s infinite;
}

.payment-pending-animation .status-icon {
    animation: pulse 1.5s infinite;
}

.payment-confirm-animation {
    animation: confirmPop 0.6s ease-out;
}

@keyframes confirmPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Glow effect for pending */
.payment-pending::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    animation: shimmer 2s infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

