/* Investment Countdown Timer Styles */

.countdown {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.countdown i {
    margin-right: 6px;
}

/* Active Investment Countdown */
.countdown.active {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: white;
    border: 1px solid #1e3a8a;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Days Remaining (Green) */
.countdown.days-remaining {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: 1px solid #047857;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Hours Remaining (Yellow) */
.countdown.hours-remaining {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border: 1px solid #b45309;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* Minutes Remaining (Orange) */
.countdown.minutes-remaining {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: 1px solid #991b1b;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    animation: pulse 1s infinite;
}

/* Seconds Remaining (Red Alert) */
.countdown.seconds-remaining {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    border: 1px solid #7f1d1d;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.5);
    animation: pulse 0.5s infinite, glow 2s infinite;
}

.countdown.seconds-remaining.danger {
    font-weight: 700;
    letter-spacing: 1px;
}

/* Completed Investment */
.countdown.completed {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: 1px solid #047857;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    opacity: 0.9;
}

.countdown.completed.success {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    border: 1px solid #0369a1;
    animation: slideDown 0.5s ease;
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(239, 68, 68, 0.6);
    }
}

@keyframes glow {
    0%, 100% {
        text-shadow: none;
    }
    50% {
        text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Investment Card with Countdown */
.investment-card {
    position: relative;
    overflow: hidden;
}

.investment-status-badge {
    display: inline-block;
    margin-top: 8px;
}

.investment-status-badge .badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.3px;
}

.investment-status-badge .badge i {
    font-size: 11px;
}

/* Countdown Progress Bar */
.countdown-progress {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    margin-top: 8px;
    overflow: hidden;
}

.countdown-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #0ea5e9);
    border-radius: 3px;
    transition: width 1s linear;
}

/* Investment Details Table */
table.investments-table tr td .countdown {
    display: block;
    text-align: center;
    margin: 8px 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .countdown {
        padding: 6px 10px;
        font-size: 12px;
    }

    .countdown i {
        margin-right: 4px;
    }

    .countdown.seconds-remaining {
        animation: pulse 0.4s infinite, glow 1.5s infinite;
    }
}

/* Print Styles */
@media print {
    .countdown {
        border: 1px solid #ccc;
        background: white !important;
        color: black !important;
        box-shadow: none !important;
    }
}
