/* Button Components */

.btn-icon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-full {
    width: 100%;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-lg {
    padding: 16px 40px;
    font-size: 18px;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--black);
    color: var(--black);
}

.btn-outline:hover {
    background: var(--black);
    color: var(--white);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: var(--error);
    color: var(--white);
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-warning {
    background: var(--warning);
    color: var(--white);
}

.btn-warning:hover {
    background: #d97706;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn:disabled:hover {
    transform: none;
}

.btn-group-vertical {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Expanding Pill Action Button */
.action-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.action-pill-toggle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0078d4, #106ebe);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 120, 212, 0.3);
    z-index: 2;
}

.action-pill-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 120, 212, 0.4);
}

.action-pill-toggle.active {
    border-radius: 18px;
    background: linear-gradient(135deg, #106ebe, #0078d4);
}

.action-pill-toggle .fa-ellipsis-h {
    transition: transform 0.3s ease;
}

.action-pill-toggle.active .fa-ellipsis-h {
    transform: rotate(90deg);
}

.action-pill-menu {
    position: absolute;
    right: 40px;
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
    padding: 4px 8px;
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    z-index: 1;
}

.action-pill.expanded .action-pill-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.action-pill-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: all 0.2s ease;
    color: #fff;
}

.action-pill-btn:hover {
    transform: scale(1.15);
}

.action-pill-btn.view {
    background: #605e5c;
}

.action-pill-btn.pdf {
    background: #d13438;
}

.action-pill-btn.email {
    background: #107c10;
}

.action-pill-btn.print {
    background: #0078d4;
}

.action-pill-btn.danger {
    background: linear-gradient(135deg, #d13438, #a4262c);
}

.action-pill-btn.success {
    background: linear-gradient(135deg, #107c10, #0b5a0b);
}

.action-pill-btn.primary {
    background: linear-gradient(135deg, #0078d4, #106ebe);
}

.action-pill-btn.edit {
    background: linear-gradient(135deg, #ffb900, #d69e00);
}

.action-pill-btn.secondary {
    background: linear-gradient(135deg, #605e5c, #3b3a39);
}

/* Stock Level Pulse/Shimmer Animation */
@keyframes stock-pulse-red {

    0%,
    100% {
        text-shadow: 0 0 4px #d13438, 0 0 8px #d13438;
        opacity: 1;
    }

    50% {
        text-shadow: 0 0 12px #d13438, 0 0 20px #d13438;
        opacity: 0.8;
    }
}

@keyframes stock-pulse-yellow {

    0%,
    100% {
        text-shadow: 0 0 4px #ffb900, 0 0 8px #ffb900;
        opacity: 1;
    }

    50% {
        text-shadow: 0 0 12px #ffb900, 0 0 20px #ffb900;
        opacity: 0.85;
    }
}

.stock-pulse-red {
    animation: stock-pulse-red 1.5s ease-in-out infinite;
}

.stock-pulse-yellow {
    animation: stock-pulse-yellow 2s ease-in-out infinite;
}

/* Mobile: Expand action pill to the right instead of left */
@media (max-width: 768px) {
    .action-pill-menu {
        right: auto;
        left: 40px;
        transform: translateX(-10px);
    }

    .action-pill.expanded .action-pill-menu {
        transform: translateX(0);
    }

    /* Adjust button sizes for mobile touch */
    .action-pill-toggle {
        width: 40px;
        height: 40px;
    }

    .action-pill-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
}