/**
 * Click Counter Button - Frontend Styles
 * Version: 1.0.0
 */
/* ============================================================
   Clean & Modern Button Styles
   ============================================================ */

/* Wrapper */
.ccb-button-wrapper {
    display: inline-block;
    margin: 12px 0;
    text-align: left;
    width: 100%;
}

/* Core Button */
.ccb-button {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 22px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: none;
    border-radius: 0px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    min-width: 160px;
}

.ccb-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #7c3aed 0%, #6366f1 100%);
}

.ccb-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.ccb-button:focus-visible {
    outline: 3px solid rgba(99, 102, 241, 0.4);
    outline-offset: 2px;
}

/* Label */
.ccb-label {
    flex: 1;
    text-align: left;
    letter-spacing: 0.02em;
}

/* Count Badge */
.ccb-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 26px;
    padding: 0 10px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 0px;
    backdrop-filter: blur(8px);
    transition: all 0.25s ease;
}

.ccb-button:hover .ccb-count {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Subtle Pulse Animation for Count Updates */
@keyframes ccb-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.25);
        background: rgba(255, 255, 255, 0.4);
    }
}

.ccb-count.ccb-animate {
    animation: ccb-pulse 0.4s ease;
}

/* Loading State */
.ccb-button.ccb-loading {
    pointer-events: none;
    opacity: 0.8;
}

.ccb-button.ccb-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.3) 50%, rgba(255, 255, 255, 0.1) 100%);
    animation: ccb-loading 1.2s linear infinite;
}

@keyframes ccb-loading {
    100% {
        left: 100%;
    }
}

/* ============================================================
   Color Variants
   ============================================================ */

/* Minimal */
.ccb-style-minimal .ccb-button {
    background: #fff;
    color: #222;
    border: 0px solid #e5e5e5;
    box-shadow: none;
}

.ccb-style-minimal .ccb-button:hover {
    background: #f7f8ff;
    border-color: #6366f1;
    color: #6366f1;
}

.ccb-style-minimal .ccb-count {
    background: #6366f1;
    color: #fff;
}

/* Dark */
.ccb-style-dark .ccb-button {
    background: linear-gradient(135deg, #18181b 0%, #27272a 100%);
    color: #fff;

}

.ccb-style-dark .ccb-button:hover {
    background: linear-gradient(135deg, #616161 0%, #18181b 100%)
}

/* Success */
.ccb-style-success .ccb-button {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
}

.ccb-style-success .ccb-button:hover {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
}

/* Danger */
.ccb-style-danger .ccb-button {
    background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
}

.ccb-style-danger .ccb-button:hover {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
}

.ccb-style-dark .ccb-count {
    display: none !important;
}

.ccb-style-dark .ccb-button {
    justify-content: center;
    text-align: center;
    padding: 12px 28px;
}

.ccb-style-dark .ccb-label {
    text-align: center;
}
/* ============================================================
   Error Message
   ============================================================ */

.ccb-error {
    color: #b91c1c;
    background: #fee2e2;
    padding: 10px 14px;
    border-left: 0px solid #b91c1c;
    font-size: 14px;
    border-radius: 0px;
    margin: 10px 0;
}

/* ============================================================
   Responsive Design
   ============================================================ */

@media (max-width: 768px) {
    .ccb-button {
        width: 100%;
        justify-content: center;
        text-align: center;
        gap: 8px;
        font-size: 14px;
        padding: 12px 18px;
    }

    .ccb-label {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .ccb-button {
        flex-direction: column;
        padding: 10px 16px;
        gap: 6px;
    }

    .ccb-count {
        min-width: 30px;
        height: 24px;
        font-size: 12px;
    }
}
