

/* ============================================
КОМПОНЕНТ: КНОПКИ
Версия: 2.0
============================================ */



/* ---------- БАЗОВЫЙ КЛАСС ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    border: none;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    font-family: inherit;
    white-space: nowrap;
    background: transparent;
    font-weight: 600;
    text-decoration: none;
    box-shadow: var(--shadow-out);

/* Объем */
    border-top: 2px solid rgba(255, 255, 255, 0.7);
    border-left: 2px solid rgba(255, 255, 255, 0.6);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
    isolation: isolate;
}




/* ---------- РАЗМЕРЫ ---------- */

.btn--xs {
    padding: 0.5rem 1.0rem;
    font-size: 0.75rem;
    border-radius: var(--radius-xs);
}
.btn--sm {
    padding: 0.9rem 1.0rem;
    font-size: 0.75rem;
    border-radius: var(--radius-xs);
}
.btn--md {
    padding: 0.8rem 1.5rem;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
}
.btn--lg {
    padding: 1rem 3.125rem;
    font-size: 1.2rem;
    border-radius: var(--radius-lg, 1.875rem);
}

@media (max-width: 768px) {
    .btn--md {
        padding: 0.7rem 1.2rem;
        font-size: 0.7rem;
    }

}



/* ---------- ЦВЕТОВЫЕ ВАРИАНТЫ ---------- */

.btn--primary {
    background: var(--btn-primary, var(--gray-500));
    color: var(--white);
}
.btn--secondary {
    background: var(--btn-secondary, var(--gray-400));
    color: var(--white);
}
.btn--outline {
    background: transparent;
    border: 1px solid var(--btn-primary);
    color: var(--btn-primary);
}
.btn--success, .btn--ok {
    background: var(--btn-success, var(--green-500));
    color: var(--white);
}
.btn--danger {
    background: var(--btn-danger, var(--red-500));
    color: var(--white);
}
.btn--warning {
    background: var(--btn-warning, var(--orange-500));
    color: var(--white);
}
.btn--edit {
    background: var(--btn-edit);
    color: var(--white);
}
.btn--cancel {
    background: var(--btn-cancel);
    color: var(--white);
}

@media (hover: hover) {
    .btn--primary:hover {
        background: var(--btn-primary-hover, #285a8f);
    }
    .btn--secondary:hover {
        background: var(--btn-secondary-hover, #444444);
    }
    .btn--success:hover {
        background: var(--btn-success-hover, #4da832);
    }
    .btn--danger:hover {
        background: var(--btn-danger-hover, #a33d3d);
    }
    .btn--warning:hover {
        background: var(--btn-warning-hover, #d97a45);
    }
    .btn--edit:hover {
        background: var(--btn-edit-hover);
    }
    .btn--cancel:hover {
        background: var(--btn-danger-hover);
    }
    .btn--ok:hover {
        background: var(--btn-success-hover, #4da832);
    }
    .btn--outline:hover {
        background: var(--btn-primary, var(--gray-500));
        color: var(--white);
        border-color: var(--btn-primary, var(--gray-500));
    }
}





/* ---------- ИКОНОЧНЫЕ КНОПКИ ---------- */

.btn--icon {
    width: 1.0rem;
    height: 1.0rem;
    flex-shrink: 0;
    min-width: 1.125rem;
    cursor: pointer;
}
.btn--icon img {
    width: 1.25rem;
    height: 1.25rem;
}
.btn--icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

.icon--sm {
    width: 1.5rem;
    height: 1.5rem;
}





/* ---------- КНОПКА УДАЛЕНИЯ ---------- */

.btn--remove {
    padding: 0;
    background: transparent;
    color: var(--text-light);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
@media (hover: hover) {
    .btn--remove:hover {
        color: var(--color-danger);
    }
}





/* ---------- КНОПКА В ВИДЕ ТЕКСТА ---------- */

.btn--text {
    background: transparent;
    color: var(--text-link);
    padding: 0;
    gap: 0;
    font-weight: 400;
    cursor: pointer;
}
.btn--text:hover {
    text-decoration: underline;
    background: transparent;
}





/* ---------- МОДИФИКАТОРЫ ШИРИНЫ ---------- */

.btn--block {
    width: 100%;
}





/* ---------- СОСТОЯНИЯ ---------- */

.btn:disabled,
.btn--disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}





/* ---------- СТИЛИ ---------- */

.btn--bold {
    font-weight: bold;
}
.btn--upper {
    text-transform: uppercase;
}







