/**
 * Animated Info Box Styles
 * Provides subtle animated background effects for important information boxes
 *
 * Usage:
 * <div class="animated-info-box [blue|green|purple|yellow]">
 *     <div class="animated-bg">
 *         <div class="anim-circle anim-circle-1"></div>
 *         <div class="anim-circle anim-circle-2"></div>
 *         <div class="anim-circle anim-circle-3"></div>
 *         <div class="anim-circle anim-circle-4"></div>
 *         <div class="anim-circle anim-circle-5"></div>
 *     </div>
 *     <div class="animated-content">
 *         <!-- Your content here -->
 *     </div>
 * </div>
 */

/* Main container for animated info box */
.animated-info-box {
    position: relative;
    border-radius: 12px;
    padding: 20px 24px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    width: 100%;
    margin-bottom: 20px;
}

/* Content layer - stays on top */
.animated-content {
    position: relative;
    z-index: 2;
}

/* Header section with icon and title */
.animated-info-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.animated-info-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 16px;
    flex-shrink: 0;
}

.animated-info-title {
    font-size: 16px;
    font-weight: 600;
}

.animated-info-text {
    line-height: 1.6;
    font-size: 14px;
    margin-bottom: 12px;
}

.animated-info-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.animated-info-link {
    text-decoration: underline;
    font-size: 14px;
    cursor: pointer;
    transition: color 0.2s;
}

.animated-info-tip {
    border-radius: 4px;
    padding: 12px 16px;
    margin-top: 12px;
    font-size: 13px;
}

/* Animated background container */
.animated-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: 1;
}

/* Animated circles */
.anim-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(8px);
    opacity: 0.1;
    will-change: transform;
    animation-fill-mode: both; /* Apply animation styles before and after animation */
}

.anim-circle-1 {
    width: 200px;
    height: 200px;
    top: -100px;
    left: -50px;
    -webkit-animation: animFloat1 8s ease-in-out infinite;
    -moz-animation: animFloat1 8s ease-in-out infinite;
    animation: animFloat1 8s ease-in-out infinite;
}

.anim-circle-2 {
    width: 150px;
    height: 150px;
    top: 50%;
    right: -75px;
    -webkit-animation: animFloat2 10s ease-in-out infinite;
    -moz-animation: animFloat2 10s ease-in-out infinite;
    animation: animFloat2 10s ease-in-out infinite;
    -webkit-animation-delay: -2s;
    animation-delay: -2s;
}

.anim-circle-3 {
    width: 100px;
    height: 100px;
    bottom: -50px;
    left: 30%;
    -webkit-animation: animFloat3 7s ease-in-out infinite;
    -moz-animation: animFloat3 7s ease-in-out infinite;
    animation: animFloat3 7s ease-in-out infinite;
    -webkit-animation-delay: -4s;
    animation-delay: -4s;
}

.anim-circle-4 {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 60%;
    -webkit-animation: animFloat4 12s ease-in-out infinite;
    -moz-animation: animFloat4 12s ease-in-out infinite;
    animation: animFloat4 12s ease-in-out infinite;
    -webkit-animation-delay: -6s;
    animation-delay: -6s;
}

.anim-circle-5 {
    width: 120px;
    height: 120px;
    bottom: 20%;
    right: 20%;
    -webkit-animation: animFloat5 9s ease-in-out infinite;
    -moz-animation: animFloat5 9s ease-in-out infinite;
    animation: animFloat5 9s ease-in-out infinite;
    -webkit-animation-delay: -3s;
    animation-delay: -3s;
}

/* Animation keyframes - WebKit versions */
@-webkit-keyframes animFloat1 {
    0% { -webkit-transform: translate(0px, 0px) scale(1) rotate(0deg); }
    25% { -webkit-transform: translate(150px, 50px) scale(1.2) rotate(90deg); }
    50% { -webkit-transform: translate(100px, -30px) scale(0.9) rotate(180deg); }
    75% { -webkit-transform: translate(-50px, 40px) scale(1.1) rotate(270deg); }
    100% { -webkit-transform: translate(0px, 0px) scale(1) rotate(360deg); }
}

@keyframes animFloat1 {
    0% { transform: translate(0px, 0px) scale(1) rotate(0deg); }
    25% { transform: translate(150px, 50px) scale(1.2) rotate(90deg); }
    50% { transform: translate(100px, -30px) scale(0.9) rotate(180deg); }
    75% { transform: translate(-50px, 40px) scale(1.1) rotate(270deg); }
    100% { transform: translate(0px, 0px) scale(1) rotate(360deg); }
}

@-webkit-keyframes animFloat2 {
    0% { -webkit-transform: translate(0px, 0px) scale(1); }
    33% { -webkit-transform: translate(-150px, -80px) scale(1.3); }
    66% { -webkit-transform: translate(-200px, 60px) scale(0.8); }
    100% { -webkit-transform: translate(0px, 0px) scale(1); }
}

@keyframes animFloat2 {
    0% { transform: translate(0px, 0px) scale(1); }
    33% { transform: translate(-150px, -80px) scale(1.3); }
    66% { transform: translate(-200px, 60px) scale(0.8); }
    100% { transform: translate(0px, 0px) scale(1); }
}

@-webkit-keyframes animFloat3 {
    0% { -webkit-transform: translate(0px, 0px) scale(1) rotate(0deg); }
    50% { -webkit-transform: translate(80px, -120px) scale(1.4) rotate(180deg); }
    100% { -webkit-transform: translate(0px, 0px) scale(1) rotate(360deg); }
}

@keyframes animFloat3 {
    0% { transform: translate(0px, 0px) scale(1) rotate(0deg); }
    50% { transform: translate(80px, -120px) scale(1.4) rotate(180deg); }
    100% { transform: translate(0px, 0px) scale(1) rotate(360deg); }
}

@-webkit-keyframes animFloat4 {
    0% { -webkit-transform: translate(0px, 0px) scale(1); }
    20% { -webkit-transform: translate(-60px, 80px) scale(1.2); }
    40% { -webkit-transform: translate(60px, 100px) scale(0.8); }
    60% { -webkit-transform: translate(-40px, -40px) scale(1.3); }
    80% { -webkit-transform: translate(80px, -60px) scale(0.9); }
    100% { -webkit-transform: translate(0px, 0px) scale(1); }
}

@keyframes animFloat4 {
    0% { transform: translate(0px, 0px) scale(1); }
    20% { transform: translate(-60px, 80px) scale(1.2); }
    40% { transform: translate(60px, 100px) scale(0.8); }
    60% { transform: translate(-40px, -40px) scale(1.3); }
    80% { transform: translate(80px, -60px) scale(0.9); }
    100% { transform: translate(0px, 0px) scale(1); }
}

@-webkit-keyframes animFloat5 {
    0% { -webkit-transform: translate(0px, 0px) scale(1); }
    25% { -webkit-transform: translate(-100px, 70px) scale(1.2); }
    50% { -webkit-transform: translate(-50px, -90px) scale(0.85); }
    75% { -webkit-transform: translate(30px, 40px) scale(1.15); }
    100% { -webkit-transform: translate(0px, 0px) scale(1); }
}

@keyframes animFloat5 {
    0% { transform: translate(0px, 0px) scale(1); }
    25% { transform: translate(-100px, 70px) scale(1.2); }
    50% { transform: translate(-50px, -90px) scale(0.85); }
    75% { transform: translate(30px, 40px) scale(1.15); }
    100% { transform: translate(0px, 0px) scale(1); }
}

/* Blue theme (default - info) */
.animated-info-box.blue {
    background: #e3f2fd;
}

.animated-info-box.blue .anim-circle {
    background: rgba(100, 181, 246, 0.4);
}

.animated-info-box.blue .anim-circle-1 {
    background: rgba(66, 165, 245, 0.4);
}

.animated-info-box.blue .anim-circle-2 {
    background: rgba(144, 202, 249, 0.4);
}

.animated-info-box.blue .anim-circle-3 {
    background: rgba(33, 150, 243, 0.4);
}

.animated-info-box.blue .anim-circle-4 {
    background: rgba(100, 181, 246, 0.5);
}

.animated-info-box.blue .anim-circle-5 {
    background: rgba(66, 165, 245, 0.45);
}

.animated-info-box.blue .animated-info-icon {
    background: #1976d2;
}

.animated-info-box.blue .animated-info-title {
    color: #1565c0;
}

.animated-info-box.blue .animated-info-text {
    color: #424242;
}

.animated-info-box.blue .animated-info-link {
    color: #1976d2;
}

.animated-info-box.blue .animated-info-link:hover {
    color: #1565c0;
}

/* Green theme (success) */
.animated-info-box.green {
    background: #e8f5e9;
}

.animated-info-box.green .anim-circle {
    background: rgba(76, 175, 80, 0.4);
}

.animated-info-box.green .anim-circle-2 {
    background: rgba(129, 199, 132, 0.4);
}

.animated-info-box.green .anim-circle-4 {
    background: rgba(102, 187, 106, 0.5);
}

.animated-info-box.green .animated-info-icon {
    background: #4caf50;
}

.animated-info-box.green .animated-info-title {
    color: #2e7d32;
}

.animated-info-box.green .animated-info-text {
    color: #424242;
}

.animated-info-box.green .animated-info-link {
    color: #4caf50;
}

.animated-info-box.green .animated-info-link:hover {
    color: #388e3c;
}

/* Purple theme (premium/upgrade) */
.animated-info-box.purple {
    background: #f3e5f5;
}

.animated-info-box.purple .anim-circle {
    background: rgba(156, 39, 176, 0.4);
}

.animated-info-box.purple .anim-circle-2 {
    background: rgba(186, 104, 200, 0.4);
}

.animated-info-box.purple .anim-circle-4 {
    background: rgba(171, 71, 188, 0.5);
}

.animated-info-box.purple .animated-info-icon {
    background: #9c27b0;
}

.animated-info-box.purple .animated-info-title {
    color: #6a1b9a;
}

.animated-info-box.purple .animated-info-text {
    color: #424242;
}

.animated-info-box.purple .animated-info-link {
    color: #9c27b0;
}

.animated-info-box.purple .animated-info-link:hover {
    color: #7b1fa2;
}

/* Yellow theme (warning/tip) */
.animated-info-box.yellow {
    background: #fffde7;
}

.animated-info-box.yellow .anim-circle {
    background: rgba(255, 193, 7, 0.3);
}

.animated-info-box.yellow .anim-circle-2 {
    background: rgba(255, 213, 79, 0.35);
}

.animated-info-box.yellow .anim-circle-4 {
    background: rgba(255, 202, 40, 0.4);
}

.animated-info-box.yellow .animated-info-icon {
    background: #ffa000;
}

.animated-info-box.yellow .animated-info-title {
    color: #f57c00;
}

.animated-info-box.yellow .animated-info-text {
    color: #424242;
}

.animated-info-box.yellow .animated-info-link {
    color: #f57c00;
}

.animated-info-box.yellow .animated-info-link:hover {
    color: #e65100;
}

/* Yellow tip box (used within other themed boxes) */
.animated-info-tip.yellow-tip {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    color: #856404;
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .anim-circle {
        animation: none;
        opacity: 0.3;
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .animated-info-box {
        padding: 16px 20px;
    }

    .animated-info-header {
        gap: 10px;
        margin-bottom: 10px;
    }

    .animated-info-icon {
        width: 24px;
        height: 24px;
        font-size: 14px;
    }

    .animated-info-title {
        font-size: 15px;
    }

    .animated-info-text {
        font-size: 13px;
    }

    .animated-info-tip {
        padding: 10px 14px;
        font-size: 12px;
    }

    /* Smaller circles on mobile for performance */
    .anim-circle-1 {
        width: 150px;
        height: 150px;
    }

    .anim-circle-2 {
        width: 120px;
        height: 120px;
    }

    .anim-circle-3 {
        width: 80px;
        height: 80px;
    }

    .anim-circle-4 {
        width: 60px;
        height: 60px;
    }

    .anim-circle-5 {
        width: 100px;
        height: 100px;
    }
}