/* 
 * Responsive Ad Banner 
 * Desktop Size: 728x90px 
 * Mobile: Adapts to width, stacks vertically
 */

:root {
    --primary-gradient: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    --bg-color: #ffffff;
    --text-color: #333333;
    --font-family: 'Outfit', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    /* For demo purposes, centering the banner on the page */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f4f4f4;
    font-family: var(--font-family);
}

/* Banner Container */
.ib-banner-container {
    width: 100%;
    max-width: 728px;
    height: 90px;
    background: var(--bg-color);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    text-decoration: none;
    /* Make the whole banner a link if desired, or wrapped in one */
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Hover Effect for the whole banner */
.ib-banner-container:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    border-color: #bc1888;
}

/* Left Side: Logo/Icon */
.ib-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.ib-icon {
    font-size: 32px;
    background: var(--primary-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.ib-logo-text {
    font-size: 20px;
    font-weight: 700;
    color: #222;
    letter-spacing: -0.5px;
}

/* Middle: Content */
.ib-content {
    flex-grow: 1;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ib-headline {
    font-size: 16px;
    font-weight: 700;
    color: #222;
    line-height: 1.2;
    margin-bottom: 4px;
}

.ib-subtext {
    font-size: 12px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ib-subtext i {
    color: #27c4f5;
    /* Checkmark color */
}

/* Right Side: CTA */
.ib-cta {
    flex-shrink: 0;
}

.ib-button {
    background: var(--primary-gradient);
    color: white;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.ib-button:hover {
    opacity: 0.9;
}

/* Animation */
@keyframes heartbeat {
    0% {
        transform: scale(1);
    }

    5% {
        transform: scale(1.1);
    }

    10% {
        transform: scale(1);
    }

    15% {
        transform: scale(1.1);
    }

    20% {
        transform: scale(1);
    }

    100% {
        transform: scale(1);
    }
}

.ib-icon {
    animation: heartbeat 3s infinite;
}

/* Responsive Media Queries */
@media (max-width: 600px) {
    .ib-banner-container {
        height: auto;
        /* Allow flexible height */
        min-height: 90px;
        flex-wrap: wrap;
        padding: 15px;
        justify-content: center;
        text-align: center;
    }

    .ib-brand {
        width: 100%;
        justify-content: center;
        margin-bottom: 8px;
    }

    .ib-content {
        width: 100%;
        padding: 0 0 12px 0;
        align-items: center;
    }

    .ib-headline {
        font-size: 15px;
    }

    .ib-cta {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .ib-button {
        width: 100%;
        justify-content: center;
    }
}

/* Visual Counter Component */
.ib-visual-counter {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 16px;
    border-radius: 40px;
    border: 1px solid #e1e1e1;
    margin: 0 15px;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    min-width: 160px;
}

.ib-avatars {
    display: flex;
    align-items: center;
    padding-left: 10px;
}

/* Generic Avatar Circle */
.ib-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #fff;
    margin-left: -12px;
    background: #eee;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
    color: #fff;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Colors for generic avatars */
.ib-avatar:nth-child(1) {
    background: #FF5722;
    z-index: 5;
}

.ib-avatar:nth-child(2) {
    background: #2196F3;
    z-index: 4;
}

.ib-avatar:nth-child(3) {
    background: #4CAF50;
    z-index: 3;
}

.ib-avatar:nth-child(4) {
    background: #9C27B0;
    z-index: 2;
}

.ib-avatar:nth-child(5) {
    background: #FFC107;
    z-index: 1;
}

.ib-counter-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.1;
}

.ib-count-num {
    font-size: 15px;
    font-weight: 800;
    color: #333;
    letter-spacing: -0.5px;
}

.ib-count-label {
    font-size: 9px;
    color: #888;
    text-transform: uppercase;
    font-weight: 600;
    margin-top: 2px;
}

/* Pulse animation for the counter when it updates */
@keyframes pulse-green {
    0% {
        transform: scale(1);
        color: #333;
    }

    50% {
        transform: scale(1.1);
        color: #27c4f5;
    }

    100% {
        transform: scale(1);
        color: #333;
    }
}

.ib-count-up {
    animation: pulse-green 0.2s ease-out;
}

/* Mobile specific adjustments */
@media (max-width: 600px) {
    .ib-visual-counter {
        margin: 12px 0;
        width: 100%;
        justify-content: center;
        order: 2;
        /* Place after text on mobile */
    }

    .ib-content {
        order: 1;
    }

    .ib-cta {
        order: 3;
    }
}

/* Additional Styles for the new Widget */
.ib-brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1;
}

.ib-tagline {
    font-size: 10px;
    color: #666;
    margin-top: 2px;
}

.ib-widget-area {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 0 10px;
}

/* Mock Instagram Card */
.ib-follow-card {
    background: white;
    border: 1px solid #dbdbdb;
    border-radius: 8px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: relative;
    min-width: 180px;
}

.ib-profile-pic {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-size: 14px;
}

.ib-profile-details {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    flex: 1;
}

.ib-username {
    font-weight: 600;
    font-size: 12px;
    color: #262626;
}

.ib-follower-count {
    font-size: 10px;
    color: #8e8e8e;
}

.ib-follow-btn {
    background: #0095f6;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 12px;
    font-weight: 600;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
}

.ib-follow-btn.following {
    background: #efefef;
    color: #262626;
    border: 1px solid #dbdbdb;
}

/* Cursor Animation */
.ib-cursor {
    width: 12px;
    height: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    position: absolute;
    top: 100%;
    left: 100%;
    transform: translate(-50%, -50%);
    display: none;
    /* Hidden by default, shown via JS if we want */
    pointer-events: none;
    z-index: 10;
}

.ib-arrow-anim {
    color: #ccc;
    font-size: 18px;
    animation: slideRight 1.5s infinite;
}

@keyframes slideRight {

    0%,
    100% {
        transform: translateX(0);
        opacity: 0.5;
    }

    50% {
        transform: translateX(5px);
        opacity: 1;
    }
}

.ib-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.ib-result-badge {
    background: #d4f7e2;
    color: #00a84e;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 12px;
    white-space: nowrap;
    box-shadow: 0 2px 5px rgba(0, 168, 78, 0.1);
}

.ib-result-subtext {
    font-size: 10px;
    color: #555;
    font-weight: 600;
}

@media (max-width: 600px) {
    .ib-widget-area {
        width: 100%;
        flex-wrap: wrap;
        margin: 10px 0;
    }

    .ib-arrow-anim {
        transform: rotate(90deg);
        margin: 5px 0;
    }
}