/**
 * ZeroShield.ai - Conversion Triggers Styling
 * Behavioral psychology-driven design for maximum conversion impact
 */

/* Modal Overlay */
.conversion-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.conversion-modal-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.4s ease-out;
    position: relative;
}

.conversion-modal-container.high {
    border: 3px solid #ff6b6b;
    box-shadow: 0 0 30px rgba(255, 107, 107, 0.3);
}

/* Modal Content */
.conversion-modal {
    padding: 32px;
    text-align: center;
}

.conversion-modal .icon {
    font-size: 48px;
    margin-bottom: 16px;
    animation: bounce 0.6s ease-out;
}

.conversion-modal h3 {
    color: #2c3e50;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.3;
}

.conversion-modal p {
    color: #5a6c7d;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 24px;
}

/* Upgrade Benefits */
.upgrade-benefits {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 24px;
    margin: 24px 0;
    text-align: left;
}

.upgrade-benefits h4 {
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    text-align: center;
}

.upgrade-benefits ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.upgrade-benefits li {
    padding: 8px 0;
    font-size: 15px;
    color: #495057;
    display: flex;
    align-items: center;
}

.upgrade-benefits li::before {
    content: '';
    width: 20px;
    height: 20px;
    margin-right: 12px;
    flex-shrink: 0;
}

/* Social Proof */
.social-proof {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 16px;
    border-radius: 12px;
    margin: 24px 0;
}

.social-proof p {
    margin: 0;
    color: white;
    font-weight: 600;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 12px;
    margin-top: 32px;
    flex-direction: column;
}

.btn-upgrade {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    padding: 16px 32px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    animation: pulse 2s infinite;
}

.btn-upgrade:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.6);
    text-decoration: none;
    color: white;
}

.btn-upgrade.mini {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 8px;
}

.btn-dismiss {
    background: transparent;
    color: #6c757d;
    padding: 12px 24px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-dismiss:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
}

/* Urgency Indicator */
.urgency-indicator {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    color: #212529;
    padding: 12px;
    border-radius: 8px;
    margin-top: 24px;
    font-size: 14px;
    font-weight: 600;
    animation: glow 2s ease-in-out infinite alternate;
}

/* Banner Styles */
.conversion-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 12px 16px;
    z-index: 9999;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.5s ease-out;
}

.banner-content {
    display: flex;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    gap: 16px;
}

.banner-content .icon {
    font-size: 24px;
    flex-shrink: 0;
}

.banner-content .message {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.banner-content .message strong {
    font-weight: 700;
    font-size: 15px;
}

.banner-content .message span {
    font-size: 13px;
    opacity: 0.9;
}

.progress-bar {
    width: 100px;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar .progress {
    height: 100%;
    background: #28a745;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.btn-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.btn-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Tooltip Styles */
.conversion-tooltip {
    position: absolute;
    background: #2c3e50;
    color: white;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    max-width: 300px;
    z-index: 9998;
    animation: fadeInUp 0.3s ease-out;
}

.tooltip-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tooltip-content .icon {
    font-size: 20px;
    flex-shrink: 0;
}

.tooltip-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    flex: 1;
}

.tooltip-link {
    color: #4facfe;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
}

.tooltip-link:hover {
    text-decoration: underline;
}

.tooltip-arrow {
    position: absolute;
    top: -8px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #2c3e50;
}

/* Engagement Stats */
.engagement-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin: 24px 0;
}

.engagement-stats .stat {
    text-align: center;
}

.engagement-stats .number {
    font-size: 32px;
    font-weight: 700;
    color: #28a745;
    line-height: 1;
}

.engagement-stats .label {
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
    font-weight: 600;
    margin-top: 4px;
}

/* Power User Badge */
.power-user-badge {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #2c3e50;
    padding: 20px;
    border-radius: 12px;
    margin: 24px 0;
    border: 2px solid #f1c40f;
}

.power-user-badge h4 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 700;
}

.power-user-badge p {
    margin: 0;
    font-size: 14px;
    color: #2c3e50;
}

/* Usage Indicators */
.usage-progress {
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
    margin: 8px 0;
}

.usage-progress.normal {
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
}

.usage-progress.warning {
    background: linear-gradient(90deg, #ffc107 0%, #fd7e14 100%);
}

.usage-progress.danger {
    background: linear-gradient(90deg, #dc3545 0%, #e74c3c 100%);
}

.usage-text {
    font-size: 12px;
    color: #6c757d;
    margin-top: 4px;
}

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

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    40%, 43% {
        transform: translate(0, -10px) rotate(-3deg);
    }
    70% {
        transform: translate(0, -5px) rotate(1deg);
    }
    90% {
        transform: translate(0, -2px);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    }
    50% {
        box-shadow: 0 4px 25px rgba(255, 107, 107, 0.7);
    }
    100% {
        box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    }
}

@keyframes glow {
    from {
        box-shadow: 0 0 20px rgba(255, 193, 7, 0.5);
    }
    to {
        box-shadow: 0 0 30px rgba(255, 193, 7, 0.8);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .conversion-modal {
        padding: 24px;
    }
    
    .conversion-modal h3 {
        font-size: 20px;
    }
    
    .banner-content {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .engagement-stats {
        gap: 16px;
    }
    
    .engagement-stats .number {
        font-size: 24px;
    }
    
    .action-buttons {
        gap: 8px;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .conversion-modal-overlay {
        background: rgba(0, 0, 0, 0.9);
    }
    
    .btn-upgrade {
        border: 2px solid #fff;
    }
    
    .social-proof {
        border: 2px solid #fff;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .conversion-modal-overlay,
    .conversion-modal-container,
    .conversion-tooltip,
    .conversion-banner {
        animation: none;
    }
    
    .btn-upgrade {
        animation: none;
    }
    
    .urgency-indicator {
        animation: none;
    }
}
