/* ============================================
   Glass Morphism Effects
   Modern glassmorphism UI components
   ============================================ */

/* Keyframe Animations */
@keyframes rotateBorder {
    0% {
        --angle: 0deg;
    }
    100% {
        --angle: 360deg;
    }
}

@property --angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

/* ============================================
   Base Glass Card
   ============================================ */
.card-glass {
    background: rgba(240, 240, 245, 0.75) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(200, 200, 210, 0.4) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1),
                0 1px 3px rgba(0, 0, 0, 0.05),
                inset 0 1px 1px rgba(255, 255, 255, 0.5);
    position: relative;
}

.card-glass::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(245, 245, 250, 0.3) 0%, 
        rgba(235, 235, 240, 0.15) 50%,
        rgba(220, 220, 230, 0.25) 100%);
    border-radius: inherit;
    pointer-events: none;
    z-index: 0;
}

.card-glass > * {
    position: relative;
    z-index: 1;
}

/* Dark Mode Variant */
[data-bs-theme="dark"] .card-glass {
    background: rgba(30, 30, 30, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4),
                0 1px 3px rgba(0, 0, 0, 0.2),
                inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .card-glass::before {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.05) 0%, 
        rgba(255, 255, 255, 0.02) 50%,
        rgba(100, 100, 100, 0.08) 100%);
}

/* ============================================
   Glass Button - Primary Green
   ============================================ */
.btn-primary.glass-button {
    background: linear-gradient(135deg, 
        rgba(102, 236, 87, 0.85) 0%,
        rgba(102, 236, 87, 0.9) 50%,
        rgba(76, 200, 65, 0.85) 100%) !important;
    backdrop-filter: blur(15px) saturate(150%);
    -webkit-backdrop-filter: blur(15px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    box-shadow: 0 3px 8px rgba(102, 236, 87, 0.18),
                inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
    color: white !important;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.btn-primary.glass-button:hover {
    background: linear-gradient(135deg, 
        rgba(102, 236, 87, 0.95) 0%,
        rgba(76, 200, 65, 1) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    box-shadow: 0 4px 12px rgba(102, 236, 87, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.7) !important;
    transform: translateY(-2px);
    color: white !important;
}

[data-bs-theme="dark"] .btn-primary.glass-button {
    background: linear-gradient(135deg, 
        rgba(102, 236, 87, 0.5) 0%,
        rgba(76, 200, 65, 0.55) 100%) !important;
    border: 1px solid rgba(102, 236, 87, 0.4) !important;
    box-shadow: 0 3px 8px rgba(102, 236, 87, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    color: white !important;
}

/* ============================================
   Glass Card - Primary Green Tint
   ============================================ */
.card-glass-primary {
    background: rgba(102, 236, 87, 0.15) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(102, 236, 87, 0.3) !important;
    box-shadow: 0 8px 32px rgba(102, 236, 87, 0.04),
                0 1px 3px rgba(0, 0, 0, 0.05),
                inset 0 1px 1px rgba(255, 255, 255, 0.5);
    position: relative;
}

.card-glass-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(102, 236, 87, 0.35) 0%, 
        rgba(76, 200, 65, 0.25) 25%,
        rgba(102, 236, 87, 0.08) 50%,
        rgba(76, 200, 65, 0.2) 75%,
        rgba(60, 180, 50, 0.3) 100%);
    border-radius: inherit;
    pointer-events: none;
    z-index: 0;
}

.card-glass-primary > * {
    position: relative;
    z-index: 1;
}

[data-bs-theme="dark"] .card-glass-primary {
    background: rgba(102, 236, 87, 0.1) !important;
    border: 1px solid rgba(102, 236, 87, 0.2) !important;
    box-shadow: 0 8px 32px rgba(102, 236, 87, 0.05),
                0 1px 3px rgba(0, 0, 0, 0.2),
                inset 0 1px 1px rgba(102, 236, 87, 0.1);
}

[data-bs-theme="dark"] .card-glass-primary::before {
    background: linear-gradient(135deg, 
        rgba(102, 236, 87, 0.15) 0%,
        rgba(76, 200, 65, 0.12) 25%, 
        rgba(102, 236, 87, 0.05) 50%,
        rgba(76, 200, 65, 0.1) 75%,
        rgba(60, 180, 50, 0.18) 100%);
}

/* ============================================
   Glass Card - Blue Tint
   ============================================ */
.card-glass-blue {
    background: linear-gradient(135deg, 
        rgba(13, 110, 253, 0.25) 0%,
        rgba(13, 110, 253, 0.15) 50%,
        rgba(10, 88, 202, 0.2) 100%) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(13, 110, 253, 0.4) !important;
    box-shadow: 0 8px 32px rgba(13, 110, 253, 0.04),
                0 1px 3px rgba(0, 0, 0, 0.05),
                inset 0 1px 1px rgba(255, 255, 255, 0.6);
    position: relative;
}

.card-glass-blue::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(13, 110, 253, 0.35) 0%, 
        rgba(65, 150, 255, 0.2) 25%,
        rgba(13, 110, 253, 0.1) 50%,
        rgba(10, 88, 202, 0.25) 75%,
        rgba(8, 70, 170, 0.3) 100%);
    border-radius: inherit;
    pointer-events: none;
    z-index: 0;
}

.card-glass-blue > * {
    position: relative;
    z-index: 1;
}

[data-bs-theme="dark"] .card-glass-blue {
    background: linear-gradient(135deg, 
        rgba(13, 110, 253, 0.18) 0%,
        rgba(13, 110, 253, 0.12) 50%,
        rgba(10, 88, 202, 0.15) 100%) !important;
    border: 1px solid rgba(13, 110, 253, 0.3) !important;
    box-shadow: 0 8px 32px rgba(13, 110, 253, 0.05),
                0 1px 3px rgba(0, 0, 0, 0.2),
                inset 0 1px 1px rgba(13, 110, 253, 0.15);
}

[data-bs-theme="dark"] .card-glass-blue::before {
    background: linear-gradient(135deg, 
        rgba(13, 110, 253, 0.15) 0%,
        rgba(65, 150, 255, 0.08) 25%, 
        rgba(13, 110, 253, 0.05) 50%,
        rgba(10, 88, 202, 0.12) 75%,
        rgba(8, 70, 170, 0.18) 100%);
}

/* ============================================
   Neutral Badge - Theme Aware
   ============================================ */
.badge-neutral {
    background: rgba(30, 30, 30, 0.9);
    color: white;
}

[data-bs-theme="dark"] .badge-neutral {
    background: rgba(240, 240, 245, 0.95);
    color: #1a1a1a;
}

/* ============================================
   Animated Pricing Border
   ============================================ */
.pricing-border-wrapper {
    position: relative;
    border-radius: 25px;
    padding: 1px;
    background: conic-gradient(
        from var(--angle),
        transparent 0%,
        transparent 70%,
        rgba(9, 184, 80, 0.3) 75%,
        rgba(9, 184, 80, 0.8) 80%,
        rgba(255, 255, 255, 0.9) 82.5%,
        rgba(9, 184, 80, 0.8) 85%,
        rgba(9, 184, 80, 0.3) 90%,
        transparent 95%,
        transparent 100%
    );
    animation: rotateBorder 8s linear infinite;
}

.pricing-border-wrapper > .card {
    position: relative;
    z-index: 1;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.95) !important;
}

[data-bs-theme="dark"] .pricing-border-wrapper > .card {
    background: rgba(20, 20, 20, 0.95) !important;
}

/* ============================================
   Glowing Border Effects
   ============================================ */
.card-glass.border-primary-hover {
    transition: all 0.3s ease;
}

.card-glass.border-primary-hover:hover {
    border-color: #09B850 !important;
    box-shadow: 0 0 20px rgba(9, 184, 80, 0.4),
                0 0 40px rgba(9, 184, 80, 0.2),
                0 8px 32px rgba(0, 0, 0, 0.1),
                inset 0 1px 1px rgba(255, 255, 255, 0.5);
}

[data-bs-theme="dark"] .card-glass.border-primary-hover:hover {
    box-shadow: 0 0 20px rgba(9, 184, 80, 0.5),
                0 0 40px rgba(9, 184, 80, 0.3),
                0 8px 32px rgba(0, 0, 0, 0.4),
                inset 0 1px 1px rgba(255, 255, 255, 0.1);
}
