/**
 * Buttons - دکمه‌های قالب Kowsh
 * 
 * استایل‌های دکمه‌های قالب
 * 
 * @package Kowsh
 * @version 1.0.0
 */

/* ========================================
   Base Button
======================================== */

.kowsh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--kowsh-spacing-sm);
    padding: 12px 24px;
    font-family: var(--kowsh-font-family-primary);
    font-size: var(--kowsh-font-size-base);
    font-weight: var(--kowsh-font-weight-semibold);
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
    border-radius: var(--kowsh-radius-lg);
    transition: all var(--kowsh-transition-base);
}

.kowsh-btn:focus {
    outline: 0;
    box-shadow: 0 0 0 3px rgba(158, 11, 15, 0.25);
}

.kowsh-btn:disabled,
.kowsh-btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* ========================================
   Button Primary (Barberry)
======================================== */

.kowsh-btn--primary {
    color: var(--kowsh-color-white);
    background: linear-gradient(135deg, var(--kowsh-color-barberry) 0%, var(--kowsh-color-barberry-light) 100%);
    box-shadow: 0 4px 12px rgba(158, 11, 15, 0.15);
}

.kowsh-btn--primary:hover {
    background: linear-gradient(135deg, var(--kowsh-color-barberry-dark) 0%, var(--kowsh-color-barberry) 100%);
    box-shadow: 0 6px 16px rgba(158, 11, 15, 0.25);
    transform: translateY(-2px);
    color: var(--kowsh-color-white);
}

.kowsh-btn--primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(158, 11, 15, 0.2);
}

/* ========================================
   Button Secondary
======================================== */

.kowsh-btn--secondary {
    color: var(--kowsh-color-barberry);
    background-color: var(--kowsh-color-white);
    border-color: var(--kowsh-color-barberry);
}

.kowsh-btn--secondary:hover {
    color: var(--kowsh-color-white);
    background-color: var(--kowsh-color-barberry);
    border-color: var(--kowsh-color-barberry);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(158, 11, 15, 0.15);
}

.kowsh-btn--secondary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(158, 11, 15, 0.1);
}

/* ========================================
   Button Outline
======================================== */

.kowsh-btn--outline {
    color: var(--kowsh-color-text-primary);
    background-color: transparent;
    border-color: var(--kowsh-color-gray-300);
}

.kowsh-btn--outline:hover {
    color: var(--kowsh-color-barberry);
    background-color: rgba(158, 11, 15, 0.05);
    border-color: var(--kowsh-color-barberry);
}

/* ========================================
   Button Text (Link Style)
======================================== */

.kowsh-btn--text {
    color: var(--kowsh-color-barberry);
    background-color: transparent;
    border-color: transparent;
    padding: 8px 16px;
}

.kowsh-btn--text:hover {
    color: var(--kowsh-color-barberry-dark);
    background-color: rgba(158, 11, 15, 0.05);
}

/* ========================================
   Button Sizes
======================================== */

.kowsh-btn--sm {
    padding: 8px 16px;
    font-size: var(--kowsh-font-size-sm);
    border-radius: var(--kowsh-radius-base);
}

.kowsh-btn--lg {
    padding: 16px 32px;
    font-size: var(--kowsh-font-size-lg);
    border-radius: var(--kowsh-radius-xl);
}

.kowsh-btn--xl {
    padding: 20px 40px;
    font-size: var(--kowsh-font-size-xl);
    border-radius: var(--kowsh-radius-2xl);
}

/* ========================================
   Button Block (Full Width)
======================================== */

.kowsh-btn--block {
    display: flex;
    width: 100%;
}

/* ========================================
   Button Icon
======================================== */

.kowsh-btn__icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.kowsh-btn--sm .kowsh-btn__icon {
    width: 16px;
    height: 16px;
}

.kowsh-btn--lg .kowsh-btn__icon {
    width: 24px;
    height: 24px;
}

/* ========================================
   Button Loading
======================================== */

.kowsh-btn--loading {
    position: relative;
    pointer-events: none;
    color: transparent !important;
}

.kowsh-btn--loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid currentColor;
    border-radius: 50%;
    border-top-color: transparent;
    animation: kowsh-btn-spin 0.6s linear infinite;
}

@keyframes kowsh-btn-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ========================================
   Button Group
======================================== */

.kowsh-btn-group {
    display: inline-flex;
    gap: var(--kowsh-spacing-sm);
}

.kowsh-btn-group .kowsh-btn {
    flex: 1;
}

/* ========================================
   Responsive
======================================== */

@media (max-width: 767px) {
    .kowsh-btn {
        padding: 10px 20px;
        font-size: var(--kowsh-font-size-sm);
    }
    
    .kowsh-btn--lg {
        padding: 14px 28px;
        font-size: var(--kowsh-font-size-base);
    }
    
    .kowsh-btn--xl {
        padding: 16px 32px;
        font-size: var(--kowsh-font-size-lg);
    }
}

