/* Counter Component Styles */
/* Reusable counter with customizable colors */

.counter-wrapper {
    /* Color variables - can be customized per instance */
    --counter-primary-color: #059669;
    --counter-primary-light: #10b981;
    --counter-primary-dark: #047857;
    --counter-bg-light: rgba(5, 150, 105, 0.1);
    --counter-bg-hover: rgba(5, 150, 105, 0.15);
    --counter-text-color: #1f2937;
    --counter-disabled-color: #d1d5db;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 12px;
    background-color: var(--counter-bg-light);
    border-radius: 12px;
    transition: background-color 0.2s ease;
}

.counter-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--counter-primary-color);
    background-color: white;
    color: var(--counter-primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.counter-btn:hover:not(:disabled) {
    background-color: var(--counter-primary-color);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.counter-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.counter-btn:disabled {
    border-color: var(--counter-disabled-color);
    color: var(--counter-disabled-color);
    cursor: not-allowed;
    opacity: 0.5;
}

.counter-btn svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
}

.counter-display {
    min-width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background-color: white;
    border-radius: 8px;
    border: 2px solid var(--counter-primary-color);
}

.counter-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--counter-primary-color);
    line-height: 1;
    user-select: none;
}

/* Theme variants */
.counter-wrapper.counter-theme-green {
    --counter-primary-color: #059669;
    --counter-primary-light: #10b981;
    --counter-primary-dark: #047857;
    --counter-bg-light: rgba(5, 150, 105, 0.1);
    --counter-bg-hover: rgba(5, 150, 105, 0.15);
}

.counter-wrapper.counter-theme-blue {
    --counter-primary-color: #3b82f6;
    --counter-primary-light: #60a5fa;
    --counter-primary-dark: #2563eb;
    --counter-bg-light: rgba(59, 130, 246, 0.1);
    --counter-bg-hover: rgba(59, 130, 246, 0.15);
}

.counter-wrapper.counter-theme-purple {
    --counter-primary-color: #8b5cf6;
    --counter-primary-light: #a78bfa;
    --counter-primary-dark: #7c3aed;
    --counter-bg-light: rgba(139, 92, 246, 0.1);
    --counter-bg-hover: rgba(139, 92, 246, 0.15);
}

.counter-wrapper.counter-theme-red {
    --counter-primary-color: #ef4444;
    --counter-primary-light: #f87171;
    --counter-primary-dark: #dc2626;
    --counter-bg-light: rgba(239, 68, 68, 0.1);
    --counter-bg-hover: rgba(239, 68, 68, 0.15);
}

/* Responsive Design */
@media (max-width: 640px) {
    .counter-wrapper {
        gap: 12px;
        padding: 10px;
    }

    .counter-btn {
        width: 36px;
        height: 36px;
    }

    .counter-btn svg {
        width: 18px;
        height: 18px;
    }

    .counter-display {
        min-width: 50px;
        padding: 6px 12px;
    }

    .counter-value {
        font-size: 20px;
    }
}

/* Animation for value change */
@keyframes counterPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.counter-value.pulse {
    animation: counterPulse 0.3s ease;
}
