/* Modern Loading Icons for Affiliate Connector */

/* ===== SHOPPING/COMMERCE THEMED LOADERS ===== */

/* Shopping Cart Loader */
.loading-cart {
    width: 40px;
    height: 40px;
    position: relative;
    margin: 0 auto;
}

.loading-cart::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 15px;
    border: 2px solid #004c9f;
    border-radius: 2px 2px 0 0;
    top: 5px;
    left: 10px;
    animation: cartMove 1.5s ease-in-out infinite;
}

.loading-cart::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: #004c9f;
    border-radius: 50%;
    top: 12px;
    left: 8px;
    animation: cartItem 1.5s ease-in-out infinite;
}

@keyframes cartMove {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(10px); }
}

@keyframes cartItem {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

/* Credit Card Processing */
.loading-card {
    width: 40px;
    height: 25px;
    background: linear-gradient(45deg, #004c9f, #003a7a);
    border-radius: 4px;
    position: relative;
    margin: 0 auto;
    animation: cardShimmer 2s ease-in-out infinite;
}

.loading-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: cardSwipe 2s ease-in-out infinite;
}

@keyframes cardShimmer {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes cardSwipe {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Package Delivery */
.loading-package {
    width: 30px;
    height: 30px;
    position: relative;
    margin: 0 auto;
}

.loading-package::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 15px;
    background: #004c9f;
    border-radius: 2px;
    top: 5px;
    left: 5px;
    animation: packageBounce 1.2s ease-in-out infinite;
}

.loading-package::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 2px;
    background: #003a7a;
    top: 12px;
    left: 11px;
    animation: packageTape 1.2s ease-in-out infinite;
}

@keyframes packageBounce {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(5deg); }
}

@keyframes packageTape {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Shopping Bag Filling */
.loading-bag {
    width: 25px;
    height: 30px;
    position: relative;
    margin: 0 auto;
}

.loading-bag::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 25px;
    border: 2px solid #004c9f;
    border-radius: 0 0 8px 8px;
    top: 0;
    left: 2.5px;
}

.loading-bag::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: #004c9f;
    border-radius: 50%;
    bottom: 2px;
    left: 9.5px;
    animation: bagFill 2s ease-in-out infinite;
}

@keyframes bagFill {
    0% { transform: translateY(0) scale(0.5); opacity: 0; }
    50% { transform: translateY(-10px) scale(1); opacity: 1; }
    100% { transform: translateY(-20px) scale(0.5); opacity: 0; }
}

/* ===== NETWORK/CONNECTION THEMED LOADERS ===== */

/* Network Nodes Connecting */
.loading-network {
    width: 50px;
    height: 30px;
    position: relative;
    margin: 0 auto;
}

.loading-network::before,
.loading-network::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: #004c9f;
    border-radius: 50%;
    top: 11px;
}

.loading-network::before {
    left: 5px;
    animation: nodePulse 1.5s ease-in-out infinite;
}

.loading-network::after {
    right: 5px;
    animation: nodePulse 1.5s ease-in-out infinite 0.75s;
}

.loading-network {
    background: linear-gradient(90deg, transparent 0%, #004c9f 50%, transparent 100%);
    background-size: 200% 2px;
    background-position: 0 50%;
    background-repeat: no-repeat;
    animation: connectionFlow 1.5s ease-in-out infinite;
}

@keyframes nodePulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.7; }
}

@keyframes connectionFlow {
    0% { background-position: -100% 50%; }
    100% { background-position: 100% 50%; }
}

/* Chain Links Connecting */
.loading-chain {
    width: 40px;
    height: 20px;
    position: relative;
    margin: 0 auto;
}

.loading-chain::before,
.loading-chain::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    border: 2px solid #004c9f;
    border-radius: 50%;
    top: 4px;
}

.loading-chain::before {
    left: 2px;
    animation: chainLink1 1.8s ease-in-out infinite;
}

.loading-chain::after {
    right: 2px;
    animation: chainLink2 1.8s ease-in-out infinite 0.9s;
}

@keyframes chainLink1 {
    0%, 100% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.1); }
}

@keyframes chainLink2 {
    0%, 100% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(-180deg) scale(1.1); }
}

/* WiFi Signal Strengthening */
.loading-wifi {
    width: 30px;
    height: 20px;
    position: relative;
    margin: 0 auto;
}

.loading-wifi::before,
.loading-wifi::after {
    content: '';
    position: absolute;
    border: 2px solid transparent;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    left: 50%;
    transform: translateX(-50%);
}

.loading-wifi::before {
    width: 20px;
    height: 10px;
    top: 5px;
    animation: wifiSignal1 2s ease-in-out infinite;
}

.loading-wifi::after {
    width: 12px;
    height: 6px;
    top: 9px;
    animation: wifiSignal2 2s ease-in-out infinite 0.5s;
}

@keyframes wifiSignal1 {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

@keyframes wifiSignal2 {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* ===== MODERN TECH THEMED LOADERS ===== */

/* Gear/Cog Rotating */
.loading-gear {
    width: 30px;
    height: 30px;
    position: relative;
    margin: 0 auto;
    animation: gearRotate 2s linear infinite;
}

.loading-gear::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid #3b82f6;
    border-radius: 50%;
    top: 5px;
    left: 5px;
}

.loading-gear::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: #004c9f;
    border-radius: 50%;
    top: 12px;
    left: 12px;
}

@keyframes gearRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Database Syncing */
.loading-database {
    width: 25px;
    height: 30px;
    position: relative;
    margin: 0 auto;
}

.loading-database::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 25px;
    border: 2px solid #004c9f;
    border-radius: 2px;
    top: 2.5px;
    left: 2.5px;
}

.loading-database::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 2px;
    background: #004c9f;
    top: 8px;
    left: 4.5px;
    animation: dataFlow 1.5s ease-in-out infinite;
}

@keyframes dataFlow {
    0% { top: 8px; opacity: 1; }
    50% { top: 18px; opacity: 0.5; }
    100% { top: 8px; opacity: 1; }
}

/* Cloud Uploading */
.loading-cloud {
    width: 35px;
    height: 20px;
    position: relative;
    margin: 0 auto;
}

.loading-cloud::before {
    content: '';
    position: absolute;
    width: 25px;
    height: 15px;
    background: #004c9f;
    border-radius: 10px;
    top: 2.5px;
    left: 5px;
    animation: cloudFloat 2s ease-in-out infinite;
}

.loading-cloud::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 8px;
    background: #003a7a;
    top: 6px;
    left: 15.5px;
    animation: cloudUpload 1.5s ease-in-out infinite;
}

@keyframes cloudFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

@keyframes cloudUpload {
    0% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(-8px); opacity: 0.3; }
    100% { transform: translateY(0); opacity: 1; }
}

/* Rocket Launching */
.loading-rocket {
    width: 20px;
    height: 30px;
    position: relative;
    margin: 0 auto;
    animation: rocketLaunch 2s ease-in-out infinite;
}

.loading-rocket::before {
    content: '';
    position: absolute;
    width: 8px;
    height: 20px;
    background: #004c9f;
    border-radius: 4px 4px 0 0;
    top: 5px;
    left: 6px;
}

.loading-rocket::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 8px solid #ef4444;
    top: 25px;
    left: 6px;
    animation: rocketFlame 0.5s ease-in-out infinite alternate;
}

@keyframes rocketLaunch {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes rocketFlame {
    0% { transform: scale(1); }
    100% { transform: scale(1.2); }
}

/* Pulse/Heartbeat */
.loading-pulse {
    width: 20px;
    height: 20px;
    position: relative;
    margin: 0 auto;
    animation: heartbeat 1.5s ease-in-out infinite;
}

.loading-pulse::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: #004c9f;
    border-radius: 50%;
    top: 0;
    left: 0;
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.1); }
    28% { transform: scale(1); }
    42% { transform: scale(1.1); }
    70% { transform: scale(1); }
}

/* ===== LOADING CONTAINER STYLES ===== */

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.loading-text {
    margin-top: 1rem;
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
}

.loading-subtext {
    margin-top: 0.5rem;
    color: #9ca3af;
    font-size: 0.75rem;
}

/* ===== RESPONSIVE SIZES ===== */

.loading-sm {
    transform: scale(0.7);
}

.loading-lg {
    transform: scale(1.3);
}

.loading-xl {
    transform: scale(1.6);
}

/* ===== COLOR VARIANTS ===== */

.loading-primary { color: #004c9f; }
.loading-success { color: #10b981; }
.loading-warning { color: #f59e0b; }
.loading-error { color: #ef4444; }
.loading-purple { color: #8b5cf6; }
.loading-pink { color: #ec4899; }

/* Apply colors to all loading icons */
.loading-primary * { border-color: #004c9f !important; background-color: #004c9f !important; }
.loading-success * { border-color: #10b981 !important; background-color: #10b981 !important; }
.loading-warning * { border-color: #f59e0b !important; background-color: #f59e0b !important; }
.loading-error * { border-color: #ef4444 !important; background-color: #ef4444 !important; }
.loading-purple * { border-color: #8b5cf6 !important; background-color: #8b5cf6 !important; }
.loading-pink * { border-color: #ec4899 !important; background-color: #ec4899 !important; }
