/**
 * CyberOps - Cyber Tips Tooltip Styling
 * Small cyber-themed security tips tooltips
 */

.cyber-tip-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    font-family: 'Ubuntu Mono', 'Courier New', monospace;
    pointer-events: none !important;
    display: none;
}

.cyber-tip-modal.active {
    display: block;
    pointer-events: none !important;
}

body.tips-disabled .cyber-tip-modal {
    display: none !important;
}

.cyber-tip-overlay {
    display: none;
}

.cyber-tip-container {
    position: absolute;
    width: 320px;
    max-width: 90vw;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 100%);
    border: 2px solid var(--accent, #00ff99);
    border-radius: 8px;
    box-shadow: 
        0 0 20px rgba(0, 255, 153, 0.4),
        0 0 40px rgba(0, 255, 153, 0.2),
        inset 0 0 20px rgba(0, 255, 153, 0.05);
    overflow: hidden;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: auto !important;
    cursor: move;
}

@keyframes flicker {
    0% {
        opacity: 0.92;
        text-shadow: 2px 2px 10px rgba(0, 255, 153, 0.5);
        box-shadow: 
            0 0 20px rgba(0, 255, 153, 0.4),
            0 0 40px rgba(0, 255, 153, 0.2),
            inset 0 0 20px rgba(0, 255, 153, 0.05);
    }
    100% {
        opacity: 1;
        text-shadow: 2px 2px 20px rgba(0, 255, 153, 0.7);
        box-shadow: 
            0 0 30px rgba(0, 255, 153, 0.6),
            0 0 50px rgba(0, 255, 153, 0.3),
            inset 0 0 30px rgba(0, 255, 153, 0.1);
    }
}

.cyber-tip-container.slide-in {
    opacity: 1;
    transform: scale(1);
}

/* Random positions */
.cyber-tip-container.pos-top-left {
    top: 20px;
    left: 20px;
}

.cyber-tip-container.pos-top-right {
    top: 20px;
    right: 20px;
}

.cyber-tip-container.pos-bottom-left {
    bottom: 80px;
    left: 20px;
}

.cyber-tip-container.pos-bottom-right {
    bottom: 80px;
    right: 20px;
}

.cyber-tip-container.pos-center-left {
    top: 50%;
    left: 20px;
    transform: translateY(-50%) scale(0.8);
}

.cyber-tip-container.pos-center-left.slide-in {
    transform: translateY(-50%) scale(1);
}

.cyber-tip-container.pos-center-right {
    top: 50%;
    right: 20px;
    transform: translateY(-50%) scale(0.8);
}

.cyber-tip-container.pos-center-right.slide-in {
    transform: translateY(-50%) scale(1);
}

/* Header */
.cyber-tip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: linear-gradient(90deg, rgba(0, 255, 153, 0.1) 0%, rgba(0, 255, 153, 0.05) 100%);
    border-bottom: 1px solid rgba(0, 255, 153, 0.3);
    position: relative;
}

.cyber-tip-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--accent, #00ff99) 50%, 
        transparent 100%);
    animation: scanline 3s linear infinite;
}

.cyber-tip-category {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent, #00ff99);
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(0, 255, 153, 0.5);
}

.cyber-tip-close {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid #ff4444;
    color: #ff4444;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.cyber-tip-close:hover {
    background: rgba(255, 68, 68, 0.2);
    box-shadow: 0 0 15px rgba(255, 68, 68, 0.5);
    transform: rotate(90deg);
}

/* Content */
.cyber-tip-content {
    padding: 12px;
    max-height: 400px;
    overflow-y: auto;
    color: #e0e0e0;
}

.cyber-tip-content::-webkit-scrollbar {
    width: 8px;
}

.cyber-tip-content::-webkit-scrollbar-track {
    background: rgba(0, 255, 153, 0.05);
}

.cyber-tip-content::-webkit-scrollbar-thumb {
    background: var(--accent, #00ff99);
    border-radius: 4px;
}

.cyber-tip-severity {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.severity-critical {
    background: rgba(255, 0, 0, 0.2);
    border: 1px solid #ff0000;
    color: #ff4444;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
}

.severity-high {
    background: rgba(255, 153, 0, 0.2);
    border: 1px solid #ff9900;
    color: #ffaa00;
    box-shadow: 0 0 10px rgba(255, 153, 0, 0.3);
}

.severity-medium {
    background: rgba(255, 255, 0, 0.2);
    border: 1px solid #ffff00;
    color: #ffff66;
    box-shadow: 0 0 10px rgba(255, 255, 0, 0.3);
}

.cyber-tip-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent, #00ff99);
    margin: 0 0 8px 0;
    text-shadow: 0 0 10px rgba(0, 255, 153, 0.5);
    font-family: 'Press Start 2P', cursive;
    line-height: 1.4;
}

.cyber-tip-text {
    font-size: 0.8rem;
    line-height: 1.5;
    margin-bottom: 10px;
    color: #d0d0d0;
    text-align: left;
}

.cyber-tip-technical {
    background: rgba(0, 255, 153, 0.05);
    border-left: 2px solid var(--accent, #00ff99);
    padding: 8px;
    margin: 10px 0;
    border-radius: 3px;
    display: none; /* Hide by default in small tooltips */
}

.tech-label {
    font-weight: 700;
    color: var(--accent, #00ff99);
    margin-bottom: 5px;
    font-size: 0.7rem;
}

.tech-label i {
    margin-right: 5px;
}

.tech-content {
    font-size: 0.7rem;
    line-height: 1.4;
    color: #b0b0b0;
    font-family: 'Courier New', monospace;
    white-space: pre-wrap;
    max-height: 80px;
    overflow-y: auto;
}

.cyber-tip-source {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
    padding: 6px 8px;
    background: rgba(0, 255, 153, 0.05);
    border-radius: 4px;
    font-size: 0.7rem;
}

.cyber-tip-source i {
    color: var(--accent, #00ff99);
}

.source-label {
    color: #888;
    font-weight: 600;
}

.source-link {
    color: var(--accent, #00ff99);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.source-link:hover {
    text-shadow: 0 0 10px rgba(0, 255, 153, 0.8);
    text-decoration: underline;
}

/* Footer */
.cyber-tip-footer {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    background: linear-gradient(90deg, rgba(0, 255, 153, 0.05) 0%, rgba(0, 255, 153, 0.1) 100%);
    border-top: 1px solid rgba(0, 255, 153, 0.3);
}

.cyber-tip-btn {
    flex: 1;
    padding: 8px 12px;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.55rem;
    border: 1px solid var(--accent, #00ff99);
    background: rgba(0, 255, 153, 0.1);
    color: var(--accent, #00ff99);
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.cyber-tip-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 153, 0.3), transparent);
    transition: left 0.5s;
}

.cyber-tip-btn:hover::before {
    left: 100%;
}

.cyber-tip-btn:hover {
    background: rgba(0, 255, 153, 0.2);
    box-shadow: 
        0 0 20px rgba(0, 255, 153, 0.5),
        inset 0 0 20px rgba(0, 255, 153, 0.1);
    transform: translateY(-2px);
}

.cyber-tip-btn:active {
    transform: translateY(0);
}

.cyber-tip-btn i {
    margin-right: 8px;
}

.cyber-tip-next {
    border-color: #00ccff;
    color: #00ccff;
}

.cyber-tip-next:hover {
    background: rgba(0, 204, 255, 0.2);
    box-shadow: 
        0 0 20px rgba(0, 204, 255, 0.5),
        inset 0 0 20px rgba(0, 204, 255, 0.1);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Glitch effect on hover */
.cyber-tip-title:hover {
    animation: glitch 0.3s;
}

@keyframes glitch {
    0% {
        transform: translate(0);
    }
    20% {
        transform: translate(-2px, 2px);
    }
    40% {
        transform: translate(-2px, -2px);
    }
    60% {
        transform: translate(2px, 2px);
    }
    80% {
        transform: translate(2px, -2px);
    }
    100% {
        transform: translate(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .cyber-tip-container {
        width: 280px;
        max-width: 85vw;
    }
    
    /* Center on mobile */
    .cyber-tip-container.pos-top-left,
    .cyber-tip-container.pos-top-right,
    .cyber-tip-container.pos-center-left,
    .cyber-tip-container.pos-center-right {
        top: 50%;
        left: 50%;
        right: auto;
        bottom: auto;
        transform: translate(-50%, -50%) scale(0.8);
    }
    
    .cyber-tip-container.pos-top-left.slide-in,
    .cyber-tip-container.pos-top-right.slide-in,
    .cyber-tip-container.pos-center-left.slide-in,
    .cyber-tip-container.pos-center-right.slide-in {
        transform: translate(-50%, -50%) scale(1);
    }
    
    .cyber-tip-container.pos-bottom-left,
    .cyber-tip-container.pos-bottom-right {
        bottom: 20px;
        left: 50%;
        right: auto;
        transform: translateX(-50%) scale(0.8);
    }
    
    .cyber-tip-container.pos-bottom-left.slide-in,
    .cyber-tip-container.pos-bottom-right.slide-in {
        transform: translateX(-50%) scale(1);
    }
}

.cyber-toggle-tips {
    position: fixed;
    bottom: 100px;
    left: 20px;
    z-index: 9999;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 100%);
    border: 2px solid var(--accent, #00ff99);
    border-radius: 8px;
    color: var(--accent, #00ff99);
    padding: 8px 15px;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.6rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 
        0 0 20px rgba(0, 255, 153, 0.4),
        0 0 40px rgba(0, 255, 153, 0.2),
        inset 0 0 20px rgba(0, 255, 153, 0.05);
}

.cyber-toggle-tips:hover {
    background: rgba(0, 255, 153, 0.2);
    box-shadow: 
        0 0 30px rgba(0, 255, 153, 0.6),
        0 0 50px rgba(0, 255, 153, 0.3),
        inset 0 0 30px rgba(0, 255, 153, 0.1);
    transform: translateY(-2px);
}

.cyber-toggle-tips.tips-on {
    border-color: var(--accent, #00ff99);
    color: var(--accent, #00ff99);
    box-shadow: 
        0 0 20px rgba(0, 255, 153, 0.4),
        0 0 40px rgba(0, 255, 153, 0.2),
        inset 0 0 20px rgba(0, 255, 153, 0.05);
    transition: all 0.3s ease;
}

.cyber-toggle-tips.tips-on:hover {
    background: rgba(0, 255, 153, 0.2);
    box-shadow: 
        0 0 30px rgba(0, 255, 153, 0.6),
        0 0 50px rgba(0, 255, 153, 0.3),
        inset 0 0 30px rgba(0, 255, 153, 0.1);
}

.cyber-toggle-tips.tips-off {
    border-color: #ff4444;
    color: #ff4444;
    box-shadow: 
        0 0 20px rgba(255, 68, 68, 0.4),
        0 0 40px rgba(255, 68, 68, 0.2),
        inset 0 0 20px rgba(255, 68, 68, 0.05);
    transition: all 0.3s ease;
}

.cyber-toggle-tips.tips-off:hover {
    background: rgba(255, 68, 68, 0.2);
    box-shadow: 
        0 0 30px rgba(255, 68, 68, 0.6),
        0 0 50px rgba(255, 68, 68, 0.3),
        inset 0 0 30px rgba(255, 68, 68, 0.1);
}

@media (max-width: 480px) {
    .cyber-tip-container {
        width: 260px;
    }
    
    .cyber-tip-title {
        font-size: 0.75rem;
    }
    
    .cyber-tip-text {
        font-size: 0.75rem;
    }
    
    .cyber-tip-btn {
        font-size: 0.5rem;
        padding: 6px 10px;
    }

    .cyber-toggle-tips {
        bottom: 120px;
        font-size: 0.5rem;
        padding: 6px 12px;
    }
}
