/* ========================================================
   Kishan Easy Traffic Flow - Frontend Styles
   ======================================================== */

.ketf-button-container {
    box-sizing: border-box;
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Above Posts on Homepage (Full Width Container) */
.ketf-position-above-posts {
    margin: 15px auto 25px auto;
    padding: 12px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    display: block;
    clear: both;
}

/* Sticky Bottom Positioning */
.ketf-position-bottom-center {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    width: 90%;
    max-width: 600px;
    z-index: 99999;
}

.ketf-position-bottom-full {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(8px);
    padding: 12px 20px;
    text-align: center;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 99999;
    box-sizing: border-box;
}

/* In-Content Positions (Before Content, After Paragraph, After Content) */
.ketf-position-before-content,
.ketf-position-after-content,
.ketf-position-paragraph,
.ketf-position-inline {
    margin: 25px auto;
    padding: 12px 0;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    display: block;
    clear: both;
}

/* Base Button - FULL WIDTH STRETCH */
.ketf-btn {
    display: flex !important;
    width: 100% !important;
    box-sizing: border-box !important;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 28px;
    font-size: 18px;
    font-weight: 700;
    border-radius: 10px;
    text-decoration: none !important;
    border: none;
    outline: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.18);
    user-select: none;
    text-align: center;
    white-space: normal;
}

/* Compact Auto-Width Modifier (if chosen in settings) */
.ketf-btn-width-auto {
    display: inline-flex !important;
    width: auto !important;
    min-width: 260px;
    border-radius: 50px;
}

/* Disabled State (During Countdown) */
.ketf-btn-disabled {
    cursor: not-allowed;
    opacity: 0.88;
    filter: grayscale(15%);
    pointer-events: none;
}

/* Active State (Countdown Finished) */
.ketf-btn-active {
    cursor: pointer;
    opacity: 1;
    filter: none;
    transform: scale(1.01);
}

.ketf-btn-active:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
}

/* Timer Badge */
.ketf-timer-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.28);
    color: #ffffff;
    font-weight: 800;
    font-size: 15px;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    flex-shrink: 0;
}

.ketf-text {
    flex-grow: 1;
    text-align: center;
}

/* Animations */
@keyframes ketf-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.65);
    }
    70% {
        box-shadow: 0 0 0 16px rgba(37, 99, 235, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
    }
}

@keyframes ketf-glow {
    0%, 100% {
        box-shadow: 0 0 15px rgba(37, 99, 235, 0.5), 0 0 30px rgba(37, 99, 235, 0.3);
    }
    50% {
        box-shadow: 0 0 25px rgba(37, 99, 235, 0.8), 0 0 45px rgba(37, 99, 235, 0.5);
    }
}

@keyframes ketf-bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-6px);
    }
    60% {
        transform: translateY(-3px);
    }
}

.ketf-anim-pulse.ketf-btn-active {
    animation: ketf-pulse 2s infinite;
}

.ketf-anim-glow.ketf-btn-active {
    animation: ketf-glow 2s infinite ease-in-out;
}

.ketf-anim-bounce.ketf-btn-active {
    animation: ketf-bounce 2s infinite;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .ketf-btn {
        padding: 14px 18px;
        font-size: 16px;
    }
    .ketf-position-above-posts {
        padding: 8px;
        margin: 10px auto 20px auto;
    }
}
