/* =========================================
   PRIMEBRIDGE LIVE ENGINE
========================================= */

/* =========================================
   STORYTELLING SECTION (Section 1)
========================================= */

.story-section {
    position: relative;
    overflow: hidden;
}

.story-block {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.story-block.visible {
    opacity: 1;
    transform: translateY(0);
}

.story-block:nth-child(2) { transition-delay: 0.15s; }
.story-block:nth-child(3) { transition-delay: 0.3s; }

.story-visual {
    position: relative;
    border-radius: 1.5rem;
    border: 1px solid rgba(255,255,255,0.08);
    background: linear-gradient(135deg, rgba(59,130,246,0.08), rgba(139,92,246,0.05));
    overflow: hidden;
}

.story-visual::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 50%, rgba(59,130,246,0.1), transparent 70%);
    opacity: 0;
    transition: opacity 0.6s ease;
}

.story-block:hover .story-visual::before {
    opacity: 1;
}

.story-detail-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.6);
    transition: all 0.3s ease;
}

.story-block:hover .story-detail-icon {
    background: rgba(59,130,246,0.15);
    border-color: rgba(59,130,246,0.3);
    color: #60a5fa;
}

/* SVG glow hover effect */
.story-visual-svg {
    width: 100%;
    height: 100%;
}

.story-visual-glow {
    position: absolute;
    inset: 0;
    border-radius: 1.5rem;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
    box-shadow: inset 0 0 60px rgba(59,130,246,0.08);
}

.story-block:hover .story-visual-glow {
    opacity: 1;
}

/* =========================================
   CONTAINER ZONES
========================================= */

.live-zone {

    position: fixed;

    top: 128px;

    width: 280px;

    z-index: 99999;

    pointer-events: none;
}

.live-zone.left {

    left: 16px;
}

.live-zone.right {

    right: 16px;
}

/* =========================================
   LIVE CARD
========================================= */

.live-notification {

    position: relative;

    overflow: hidden;

    padding: 8px 10px;

    margin-bottom: 6px;

    border-radius: 14px;

    background:
        linear-gradient(
            135deg,
            rgba(255,255,255,.05),
            rgba(255,255,255,.025)
        );

    border: 1px solid rgba(255,255,255,.07);

    backdrop-filter: blur(18px);

    box-shadow:
        0 4px 16px rgba(0,0,0,.28);

    color: white;

    display: flex;

    align-items: center;

    gap: 10px;

    animation: liveIn .4s ease;

    pointer-events: auto;

    transition:
        transform .35s ease,
        border-color .35s ease;
}

.live-notification:hover {

    transform: translateY(-2px);

    border-color:
        rgba(16,185,129,.22);
}

/* =========================================
   MOVING GLOW
========================================= */

.live-notification::before {

    content: "";

    position: absolute;

    top: 0;
    left: -140%;

    width: 60%;
    height: 100%;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255,255,255,.08),
            transparent
        );

    transform: skewX(-18deg);

    animation: glowSweep 6s linear infinite;
}

/* =========================================
   LIVE DOT
========================================= */

.live-dot {

    position: relative;

    z-index: 2;

    width: 8px;
    height: 8px;

    border-radius: 999px;

    flex-shrink: 0;
}

.live-dot.deposit {

    background: #10b981;

    box-shadow:
        0 0 12px #10b981;
}

.live-dot.withdrawal {

    background: #ef4444;

    box-shadow:
        0 0 12px #ef4444;
}

.live-dot.registration {

    background: #f59e0b;

    box-shadow:
        0 0 12px #f59e0b;
}

.live-dot.managedPortfolio {

    background: #8b5cf6;

    box-shadow:
        0 0 12px #8b5cf6;
}

.live-dot.selfTrading {

    background: #06b6d4;

    box-shadow:
        0 0 12px #06b6d4;
}

.live-dot.sectors {

    background: #ec4899;

    box-shadow:
        0 0 12px #ec4899;
}

.live-dot.capitalInstruments {

    background: #eab308;

    box-shadow:
        0 0 12px #eab308;
}

.live-dot.bonus {

    background: #f97316;

    box-shadow:
        0 0 12px #f97316;
}

/* =========================================
   CONTENT
========================================= */

.live-content {

    position: relative;

    z-index: 2;

    flex: 1;

    display: flex;

    flex-direction: column;

    gap: 1px;
}

.live-name {

    font-size: 11px;

    font-weight: 700;

    color: white;

    line-height: 1.3;

    min-width: 0;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;
}

.live-title {

    font-size: 10px;

    font-weight: 500;

    color:
        rgba(255,255,255,.6);

    line-height: 1.3;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.live-title strong {

    color: #10b981;
}

.live-meta {

    margin-top: 5px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 8px;
}

.live-country {

    font-size: 10px;

    color:
        rgba(255,255,255,.58);
}

.live-time {

    font-size: 10px;

    color:
        rgba(255,255,255,.35);
}

/* =========================================
   TRANSACTION MODAL
========================================= */

.txn-modal {

    position: fixed;

    inset: 0;

    background:
        rgba(0,0,0,.58);

    backdrop-filter: blur(10px);

    display: flex;

    align-items: center;

    justify-content: center;

    z-index: 999999;
}

.txn-modal.hidden {

    display: none;
}

.txn-card {
    width: 400px;
    max-width: 94%;
    border-radius: 24px;
    padding: 0;
    overflow: hidden;
    background: linear-gradient(180deg,
        rgba(20,25,50,0.95),
        rgba(15,18,40,0.98)
    );
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 0 80px rgba(0,0,0,0.5),
                0 0 40px rgba(139,92,246,0.06);
    animation: liveIn .3s ease;
}

/* --- Header --- */
.txn-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.txn-title {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.2px;
}
.txn-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
    text-transform: capitalize;
}
.txn-close {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.5);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s ease;
}
.txn-close:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

/* --- Summary Section --- */
.txn-summary {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 22px;
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.txn-summary-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
}
.txn-summary-avatar {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
}
.txn-summary-avatar svg {
    display: block;
}
.txn-summary-info {
    flex: 1;
    min-width: 0;
}
.txn-summary-name {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.3px;
}
.txn-summary-amount {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    margin-top: 2px;
    letter-spacing: -0.5px;
}
.txn-summary-country {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    margin-top: 1px;
}
.txn-summary-status {
    font-size: 11px;
    text-align: right;
    white-space: nowrap;
}

/* --- Detail Rows --- */
.txn-body {
    padding: 14px 22px 20px;
}
.txn-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.txn-row:last-child {
    border-bottom: none;
}
.txn-label {
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.txn-value {
    font-size: 13px;
    color: rgba(255,255,255,0.85);
    font-weight: 600;
    text-align: right;
}

/* =========================================
   ANIMATIONS
========================================= */

@keyframes liveIn {

    from {

        opacity: 0;

        transform:
            translateY(12px)
            scale(.97);
    }

    to {

        opacity: 1;

        transform:
            translateY(0)
            scale(1);
    }
}

@keyframes glowSweep {

    0% {

        left: -140%;
    }

    100% {

        left: 140%;
    }
}

/* =========================================
   MOBILE
========================================= */

@media(max-width:768px){

    .live-zone {

        width: calc(100% - 24px);
        max-width: 300px;

        left: 12px !important;

        right: 12px !important;

        top: 110px;

        bottom: auto;
    }

    .live-notification {

        padding: 10px 12px;

        border-radius: 16px;
    }

}